Skip to content

Commit

Permalink
Compatibility with NumPy 2.0 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche committed Jun 19, 2024
1 parent 97dbf00 commit f3c80d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/iranges/IRanges.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ def _sanitize_start(self, start):
if isinstance(start, np.ndarray) and start.dtype == np.int32:
return start

return np.array(start, dtype=np.int32, copy=False)
return np.asarray(start, dtype=np.int32)

def _sanitize_width(self, width):
if isinstance(width, np.ndarray) and width.dtype == np.int32:
return width

return np.array(width, dtype=np.int32, copy=False)
return np.asarray(width, dtype=np.int32)

def _validate_width(self):
if len(self._start) != len(self._width):
Expand Down

0 comments on commit f3c80d2

Please sign in to comment.