Skip to content

np.int is deprecated #17

@GravitationalWaveSurfer

Description

Hi, just to let you know that when computing the CWT I found the following issue in scaleogram/wfun.py , which is due to the fact that numpy.int is deprecated.

File ~/.local/lib/python3.11/site-packages/scaleogram/wfun.py:188, in fastcwt..(s)
182 int_psi, x = pywt.integrate_wavelet(wavelet, precision=precision)
184 if method in ('auto', 'fft'):
185 # - to be as large as the sum of data length and and maximum wavelet
186 # support to avoid circular convolution effects
187 # - additional padding to reach a power of 2 for CPU-optimal FFT
--> 188 size_pad = lambda s: 2**np.int(np.ceil(np.log2(s[0] + s[1])))
189 size_scale0 = size_pad( (len(data),
190 np.take(scales, 0) * ((x[-1] - x[0]) + 1)) )
191 fft_data = None

File /data01/shared/EnvPy3.11/lib/python3.11/site-packages/numpy/init.py:284, in getattr(attr)
281 from .testing import Tester
282 return Tester
--> 284 raise AttributeError("module {!r} has no attribute "
285 "{!r}".format(name, attr))

AttributeError: module 'numpy' has no attribute 'int'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions