Skip to content

Commit

Permalink
Use sparse neighbor matrix (#826)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe authored and kbruegge committed Dec 12, 2018
1 parent d30d4d8 commit f9e91c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ctapipe/image/cleaning.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def number_of_islands(geom, mask):
Entries range from 0 (not in the pixel mask) to num_islands.
"""
# compress sparse neighbor matrix
neighbor_matrix_compressed = geom.neighbor_matrix[mask][:, mask]
neighbor_matrix_compressed = geom.neighbor_matrix_sparse[mask][:, mask]
# pixels in no cluster have label == 0
island_labels = np.zeros(geom.n_pixels)

Expand Down

0 comments on commit f9e91c5

Please sign in to comment.