Skip to content

Commit f63c829

Browse files
committed
vstack neighbors before asking for max
1 parent 6271153 commit f63c829

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

simpeg_drivers/utils/regularization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def cell_adjacent(neighbors: list[np.ndarray]) -> list[np.ndarray]:
126126
"""Find all adjacent cells (corners) from cell neighbor array."""
127127

128128
dim = len(neighbors)
129-
max_index = np.max(neighbors)
129+
max_index = np.max(np.vstack(neighbors))
130130
corners = -1 * np.ones((dim, max_index + 1), dtype="int")
131131

132132
corners[0, neighbors[1][:, 0]] = neighbors[1][:, 1]

0 commit comments

Comments
 (0)