Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve small numpy, numba compatibility issues #62

Merged
merged 3 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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