From 013426923ab6f3f6f89b9f9814c780c4efbece40 Mon Sep 17 00:00:00 2001 From: Philipenko Vladimir Date: Thu, 8 Aug 2024 18:25:27 +0300 Subject: [PATCH 1/2] Add some compatibility with numpy==2.0.0 --- dpipe/im/metrics.py | 2 +- dpipe/im/utils.py | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dpipe/im/metrics.py b/dpipe/im/metrics.py index 66d8247..171e730 100644 --- a/dpipe/im/metrics.py +++ b/dpipe/im/metrics.py @@ -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): diff --git a/dpipe/im/utils.py b/dpipe/im/utils.py index 26625ce..71fcf84 100644 --- a/dpipe/im/utils.py +++ b/dpipe/im/utils.py @@ -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``. From 3d35b39e3af657f6b367b3fbb35b152f9e5cb1db Mon Sep 17 00:00:00 2001 From: Philipenko Vladimir Date: Thu, 8 Aug 2024 18:25:38 +0300 Subject: [PATCH 2/2] version --- dpipe/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpipe/__version__.py b/dpipe/__version__.py index abeeedb..f0ede3d 100644 --- a/dpipe/__version__.py +++ b/dpipe/__version__.py @@ -1 +1 @@ -__version__ = '0.4.0' +__version__ = '0.4.1'