Skip to content

Commit

Permalink
Add some compatibility with numpy==2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vovaf709 committed Aug 8, 2024
1 parent 7fa6865 commit 0134269
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion dpipe/im/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def iou(x: np.ndarray, y: np.ndarray) -> float:


def get_area(start, stop):
return np.product(np.maximum(stop - start, 0))
return np.prod(np.maximum(stop - start, 0))


def box_iou(a_start_stop, b_start_stop):
Expand Down
4 changes: 0 additions & 4 deletions dpipe/im/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ def wrapper(*args_, **kwargs_):
return decorator


def name_changed(func: Callable, old_name: str, date: str):
return np.deprecate(func, old_name=old_name, new_name=func.__name__)


def get_mask_volume(mask: np.ndarray, *spacing: AxesParams, location: bool = False) -> float:
"""
Calculates the ``mask`` volume given its spatial ``spacing``.
Expand Down

0 comments on commit 0134269

Please sign in to comment.