From 424465f91b0dc18b7b5f7112a8468daf4ca6413f Mon Sep 17 00:00:00 2001 From: Eric Creusen Date: Mon, 23 Jan 2023 11:34:46 +0100 Subject: [PATCH 1/2] Fix usage of removed np.int. This was removed in numpy v1.24. NOTE: previously np.int also aliased the python int, so this is not a functional change --- lib/scaleogram/wfun.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/scaleogram/wfun.py b/lib/scaleogram/wfun.py index 6a0accf..e126640 100644 --- a/lib/scaleogram/wfun.py +++ b/lib/scaleogram/wfun.py @@ -115,7 +115,7 @@ def child_wav(wavelet, scale): if np.max(j) >= np.size(int_psi): j = np.delete(j, np.where((j >= np.size(int_psi)))[0]) - return int_psi[j.astype(np.int)] + return int_psi[j.astype(int)] @@ -185,7 +185,7 @@ def fastcwt(data, scales, wavelet, sampling_period=1.0, method='auto'): # - to be as large as the sum of data length and and maximum wavelet # support to avoid circular convolution effects # - additional padding to reach a power of 2 for CPU-optimal FFT - size_pad = lambda s: 2**np.int(np.ceil(np.log2(s[0] + s[1]))) + size_pad = lambda s: 2**int(np.ceil(np.log2(s[0] + s[1]))) size_scale0 = size_pad( (len(data), np.take(scales, 0) * ((x[-1] - x[0]) + 1)) ) fft_data = None @@ -198,7 +198,7 @@ def fastcwt(data, scales, wavelet, sampling_period=1.0, method='auto'): np.arange(scales[i] * (x[-1] - x[0]) + 1) / (scales[i] * step)) if np.max(j) >= np.size(int_psi): j = np.delete(j, np.where((j >= np.size(int_psi)))[0]) - int_psi_scale = int_psi[j.astype(np.int)][::-1] + int_psi_scale = int_psi[j.astype(int)][::-1] if method == 'conv': conv = np.convolve(data, int_psi_scale) From 5804642af123f2f19c60dade3278f5da5fe414e4 Mon Sep 17 00:00:00 2001 From: Eric Creusen Date: Mon, 23 Jan 2023 13:21:26 +0100 Subject: [PATCH 2/2] Minor version bump --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 41868b4..9ecd090 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setuptools.setup( name='scaleogram', - version='0.9.5', + version='0.9.6', author="Alexandre Sauve", author_email="asauve@gmail.com", description="User friendly scaleogram plot for Continuous Wavelet Transform",