Skip to content

Commit

Permalink
Merge pull request #62 from wafo-project/np_machar_depr
Browse files Browse the repository at this point in the history
resolve small numpy, numba compatibility issues
  • Loading branch information
davidovitch authored Nov 9, 2023
2 parents ccb1912 + 5c916ac commit 0d0f238
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/wafo/_misc_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/wafo/kdetools/kdetools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 7 additions & 2 deletions src/wafo/stats/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0d0f238

Please sign in to comment.