Skip to content

Commit

Permalink
Try fixing Numpy datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed Oct 4, 2024
1 parent 7eebf47 commit 7f9a5d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nipy/algorithms/graph/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,10 +719,10 @@ def compact_neighb(self):
weights: array of shape(self.E), concatenated list of weights
"""
order = np.argsort(self.edges[:, 0] * float(self.V) + self.edges[:, 1])
neighb = self.edges[order, 1].astype(np.int_)
neighb = self.edges[order, 1].astype(np.intp)
weights = self.weights[order]
degree, _ = self.degrees()
idx = np.hstack((0, np.cumsum(degree))).astype(np.int_)
idx = np.hstack((0, np.cumsum(degree))).astype(np.intp)
return idx, neighb, weights

def floyd(self, seed=None):
Expand Down

0 comments on commit 7f9a5d0

Please sign in to comment.