From 7696be35b2cf2fd5d8c4c60e1a6430a21b7e0bea Mon Sep 17 00:00:00 2001 From: David Verelst Date: Mon, 6 Nov 2023 09:09:57 +0100 Subject: [PATCH 1/3] np.finfo.machar is depricated, use finfo.min also in comment --- src/wafo/kdetools/kdetools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wafo/kdetools/kdetools.py b/src/wafo/kdetools/kdetools.py index 02d5766..22545dd 100644 --- a/src/wafo/kdetools/kdetools.py +++ b/src/wafo/kdetools/kdetools.py @@ -28,7 +28,7 @@ __all__ = ['TKDE', 'KDE', 'test_docstrings', 'KRegression', 'BKRegression'] _TINY = np.finfo(float).tiny -# _REALMIN = np.finfo(float).machar.min +# _REALMIN = np.finfo(float).min _REALMAX = np.finfo(float).max _EPS = np.finfo(float).eps From 141ef879f2db541982f91e6d59bf7dac1f6786cf Mon Sep 17 00:00:00 2001 From: David Verelst Date: Wed, 8 Nov 2023 12:00:18 +0100 Subject: [PATCH 2/3] numpy.testing.Tester was removed in numpy v1.25.0 --- src/wafo/stats/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wafo/stats/__init__.py b/src/wafo/stats/__init__.py index f9dd5ce..f73b480 100644 --- a/src/wafo/stats/__init__.py +++ b/src/wafo/stats/__init__.py @@ -26,5 +26,10 @@ # remove vonmises_cython from __all__, I don't know why it is included __all__ = [s for s in dir() if not (s.startswith('_') or s.endswith('cython'))] -from numpy.testing import Tester -test = Tester().test +# numpy.testing.Tester was removed in numpy 1.25 +# https://github.com/numpy/numpy/pull/23041 +# https://github.com/numpy/numpy/releases/tag/v1.25.0 + +# why is this here?? +#from numpy.testing import Tester +#test = Tester().test From 5c916ac782beb58f206d1bfc9c41d551bed9b481 Mon Sep 17 00:00:00 2001 From: David Verelst Date: Wed, 8 Nov 2023 12:08:49 +0100 Subject: [PATCH 3/3] set nopython=True for all numba.jit decorators --- src/wafo/_misc_numba.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wafo/_misc_numba.py b/src/wafo/_misc_numba.py index 743c146..9b3f85c 100644 --- a/src/wafo/_misc_numba.py +++ b/src/wafo/_misc_numba.py @@ -31,7 +31,7 @@ # break -@jit(int64(int64[:], int8[:])) +@jit(int64(int64[:], int8[:]), nopython=True) def _findcross(ind, y): """Returns indices to zero level crossings of y vector @@ -471,7 +471,7 @@ def disufq(rA, iA, w, kw, h, g, nmin, nmax, m, n): return rvec, ivec -@jit(int64(float64[:], float64[:], float64[:, :])) +@jit(int64(float64[:], float64[:], float64[:, :]), nopython=True) def _findrfc3_astm(array_ext, a, array_out): """ Rain flow without time analysis @@ -519,7 +519,8 @@ def _findrfc3_astm(array_ext, a, array_out): return c_nr1 #, c_nr2] -@jit(int64(float64[:], float64[:], float64[:], float64[:], float64[:, :])) +@jit(int64(float64[:], float64[:], float64[:], float64[:], float64[:, :]), + nopython=True) def _findrfc5_astm(array_ext, array_t, a, t, array_out): """ Rain flow with time analysis