LinkedEarth / Pyleoclim_util

Python Package for the Analysis of Paleoclimate Data. Documentation at
https://pyleoclim-util.readthedocs.io
GNU General Public License v3.0
88 stars 33 forks source link

np.int depreciated #477

Closed philkongo closed 10 months ago

philkongo commented 11 months ago

Describe the bug np.int is still used in pyleoclim; for example in the wave coherence function. prevents the wavelet coherence function from running.

To Reproduce Steps to reproduce the behavior:

  1. run the coherence wavelet function e.g. coh = ts_a.wavelet_coherence(ts_b, method = 'wwz')

Expected behavior wavelet coherence function to work

Screenshots Screenshot 2023-11-23 at 12 05 38 AM

Desktop (please complete the following information):

Additional context

khider commented 11 months ago

Which version of numpy do you have currently installed?

philkongo commented 11 months ago

Hi Deborah,

I am running numpy version 1.26.0.

Phil

On Mon, Nov 27, 2023 at 11:03 PM Deborah Khider @.***> wrote:

Which version of numpy do you have currently installed?

— Reply to this email directly, view it on GitHub https://github.com/LinkedEarth/Pyleoclim_util/issues/477#issuecomment-1829226744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMW3EYNLGTGXGWLDAMQ5HJDYGWECVAVCNFSM6AAAAAA7XLOK4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRZGIZDMNZUGQ . You are receiving this because you authored the thread.Message ID: @.***>

CommonClimate commented 11 months ago

Weird. My current version of the code (prior to seeing this issue) in branch pip_install has: return {'n': int(2 ** np.ceil(np.log2(len(signal))))} for that line. I wonder when it got changed, but it should work with this version of NumPy.

philkongo commented 11 months ago

I uninstalled pyleoclim and reinstalled it-- it installed numpy 1.23.5 and now it runs!

Appreciate you both looking into it. Phil

On Tue, Nov 28, 2023 at 5:40 PM Julien Emile-Geay @.***> wrote:

Weird. My current version of the code (prior to seeing this issue) in branch pip_install has: return {'n': int(2 ** np.ceil(np.log2(len(signal))))} for that line. I wonder when it got changed, but it should work with this version of NumPy.

— Reply to this email directly, view it on GitHub https://github.com/LinkedEarth/Pyleoclim_util/issues/477#issuecomment-1831055266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMW3EYJTDAZOQMKVCXVZBKTYG2G7HAVCNFSM6AAAAAA7XLOK4SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZRGA2TKMRWGY . You are receiving this because you authored the thread.Message ID: @.***>