Giter Club home page Giter Club logo

Comments (10)

jajcayn avatar jajcayn commented on July 2, 2024

Dear @anoukvlug
unfortunately, pyclits is pretty old and unmaintained. The reason for your error is that pyclist was developed for python2.7 which is now deprecated. Last time I tried, it did not work with python3.

As for the future of pyclits, unfortunately I do not have the time right now to update it, but I started rewriting core functionality to python3 in branches rewrite/*. If you feel adventurous you might fork the package, checkout rewrite branch and try to finish basic core, then the installation on python3 should work.

Thanks for understanding,
Best,

Nikola

from pyclits.

anoukvlug avatar anoukvlug commented on July 2, 2024

Dear Nikola,
Thank you for your fast and kind reply! Unfortunately it is not the right time for me to be adventures and dive into the code.
Kind regards,
Anouk

from pyclits.

mafycek avatar mafycek commented on July 2, 2024

from pyclits.

anoukvlug avatar anoukvlug commented on July 2, 2024

@mafycek thanks a lot for the advice! I just installed your branch and at first sight it seems to work :)

from pyclits.

mafycek avatar mafycek commented on July 2, 2024

from pyclits.

anoukvlug avatar anoukvlug commented on July 2, 2024

Sorry, I wrote my previous message to early. I thought you meant the branch would work with python 3. So after I installed both the branch and was able able to load the package, I thought it would work. However I kept running into errors, when trying to using the functions. It won't recognize all the functions (some it does recognize though) that are actually there:

e.g.:

AttributeError                            Traceback (most recent call last)
<ipython-input-19-f363db24ae29> in <module>
----> 1 nino34 = clt.data_loaders.load_enso_index("/aop1/avlug/nino34raw.txt", "3.4", start_date = date(1870, 1, 1), 
      2     end_date = date(2017, 7, 1), anom = False)
      3 

AttributeError: module 'pyclits' has no attribute 'data_loaders'

For this I used a python environment (env not venv). I'm not familiar with poetry.

from pyclits.

anoukvlug avatar anoukvlug commented on July 2, 2024

Actually, I wouldn't really need the data_loaders function, however I thought it would be good to get the example to work. As having an example would make it easier to figure out how to solve the error that I am having with the wavelet analysis function:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-23-4590a8ad37dc> in <module>
      1 wave, period, scale, coi = wavelet_analysis.continous_wavelet(df['001'].values, dt = dt, wavelet = mother, 
----> 2                                                               dj = dj, s0 = s0, j1 = j1, k=k0)

~/Programs/miniconda3/envs/oggm_env/lib/python3.6/site-packages/pyclits/wavelet_analysis.py in continous_wavelet(X, dt, pad, wavelet, **kwargs)
    137     k = np.arange(1, np.fix(n/2) + 1)
    138     k *= (2. * np.pi) / (n * dt)
--> 139     k_minus = -k[int(np.fix(n-1))/2 - 1::-1]
    140     k = np.concatenate((np.array([0.]), k, k_minus))
    141 

TypeError: slice indices must be integers or None or have an __index__ method

I have no clue if this error would be easy to solve or if it would get tricky and I can better look for another approach to do the wavelet analysis. @mafycek do you maybe know a quick fix for this problem? Or is this going to take quite some time to solve?

from pyclits.

mafycek avatar mafycek commented on July 2, 2024

from pyclits.

mafycek avatar mafycek commented on July 2, 2024

from pyclits.

mafycek avatar mafycek commented on July 2, 2024

from pyclits.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.