diff --git a/libpysal/weights/weights.py b/libpysal/weights/weights.py index 9f1e4e8d6..c71e40560 100644 --- a/libpysal/weights/weights.py +++ b/libpysal/weights/weights.py @@ -432,12 +432,9 @@ def to_adjlist( links = [] focal_ix, neighbor_ix = self.sparse.nonzero() - names = np.asarray(self.id_order) - focal = names[focal_ix] - neighbor = names[neighbor_ix] weights = self.sparse.data adjlist = pandas.DataFrame( - {focal_col: focal, neighbor_col: neighbor, weight_col: weights} + {focal_col: focal_ix, neighbor_col: neighbor_ix, weight_col: weights} ) if remove_symmetric: adjlist = adjtools.filter_adjlist(adjlist)