Skip to content

Commit

Permalink
BUG: Another try at scalar slices in matrix_operations
Browse files Browse the repository at this point in the history
  • Loading branch information
keileg committed Jan 17, 2025
1 parent 6480f49 commit 3f1bbb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/porepy/numerics/linalg/matrix_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def slice_indices(
indices: np.ndarray = A.indices[array_ind]
elif isinstance(slice_ind, np.generic):
# Special case for single index.
assert slice_ind.dtype == int # For mypy.
assert isinstance(slice_ind, np.integer) # For mypy.
array_ind = slice(A.indptr[slice_ind], A.indptr[slice_ind + 1])
indices = A.indices[array_ind]
else:
Expand Down

0 comments on commit 3f1bbb4

Please sign in to comment.