Skip to content

Commit

Permalink
convert uint to unsigned int to allow negative indexing instead of wr…
Browse files Browse the repository at this point in the history
…aparound with unsinged ints
  • Loading branch information
waltsims committed Nov 19, 2024
1 parent 4ba0095 commit 3088069
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kwave/utils/matlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def matlab_mask(arr: np.ndarray, mask: np.ndarray, diff: Optional[int] = None) -
"""

if mask.dtype == "uint8":
mask = mask.dtype("int8")

if diff is None:
flat_mask = mask.ravel(order="F")
else:
Expand Down

0 comments on commit 3088069

Please sign in to comment.