From 39052743a109dce9ada4ffb5a2420ecd17f555a6 Mon Sep 17 00:00:00 2001 From: Monika Feldmann Date: Sun, 25 Sep 2022 22:42:36 +0200 Subject: [PATCH] Fix future warning (#301) * fixed future warning * Specify minimum version for scikit-image Co-authored-by: Daniele Nerini --- doc/source/user_guide/install_pysteps.rst | 2 +- pysteps/feature/tstorm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/user_guide/install_pysteps.rst b/doc/source/user_guide/install_pysteps.rst index 928f99a63..d879a00bd 100644 --- a/doc/source/user_guide/install_pysteps.rst +++ b/doc/source/user_guide/install_pysteps.rst @@ -37,7 +37,7 @@ Other optional dependencies include: * `pywavelets `_ (for intensity-scale verification) * `pandas `_ and - `scikit-image `_ (for advanced feature detection methods) + `scikit-image >=0.19 `_ (for advanced feature detection methods) * `rasterio `_ (for the reprojection module) diff --git a/pysteps/feature/tstorm.py b/pysteps/feature/tstorm.py index f8b49b15d..40fa3d4f9 100644 --- a/pysteps/feature/tstorm.py +++ b/pysteps/feature/tstorm.py @@ -150,7 +150,7 @@ def detection( if np.nanmax(filt_image.flatten()) < minref: maxima = np.zeros(filt_image.shape) else: - maxima = skim.h_maxima(filt_image, h=mindiff, selem=struct) + maxima = skim.h_maxima(filt_image, h=mindiff, footprint=struct) loc_max = np.where(maxima > 0) loc_max = longdistance(loc_max, mindis)