Coder Social home page Coder Social logo

Comments (4)

mnlevy1981 avatar mnlevy1981 commented on August 18, 2024

This looks like a different error than you were previously getting -- didn't you show me

TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'CFTimeIndex'

I got the above error trying to run ds = esmlab.resample(ds, freq='ann').mean('time').compute() in a notebook and @andersy005 said it was related to #139 (I didn't save the traceback from that error, but I can recreate it if that would be helpful)

from esmlab.

dcherian avatar dcherian commented on August 18, 2024

Anderson fixed this in pydata/xarray#3430. if you install cftime=1.0.3.4 that error should not appear.

from esmlab.

klindsay28 avatar klindsay28 commented on August 18, 2024

@mnlevy1981 , I get the error message that you are showing if I pass decode_times=False to xr_ds_ex, instead of True. So I'm getting different error messages if time is decoded or not.

from esmlab.

klindsay28 avatar klindsay28 commented on August 18, 2024

Thanks @dcherian!
Switching to cftime=1.0.3.4 solves my problem when I pass decode_times=True.
(I might have the meaning of decoded time reversed here compared to xarray. I tend to get confused about which representation of time is viewed as being encoded vs. not.)

from esmlab.

Related Issues (20)

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.