Skip to content

Commit

Permalink
Support scipy 1.14, fixes #2568
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Jun 26, 2024
1 parent f6202a8 commit ebe5330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ctapipe/instrument/camera/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ def neighbors(self):

@lazyproperty
def neighbor_matrix(self):
return self.neighbor_matrix_sparse.A
return self.neighbor_matrix_sparse.toarray()

@lazyproperty
def max_neighbors(self):
Expand Down Expand Up @@ -941,7 +941,7 @@ def get_border_pixel_mask(self, width=1):
warnings.filterwarnings("ignore", category=PendingDeprecationWarning)

if width == 1:
n_neighbors = self.neighbor_matrix_sparse.sum(axis=1).A1
n_neighbors = np.asarray(self.neighbor_matrix_sparse.sum(axis=0))[0]
max_neighbors = n_neighbors.max()
mask = n_neighbors < max_neighbors
else:
Expand Down

0 comments on commit ebe5330

Please sign in to comment.