-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Buffer has wrong number of dimensions (expected 1, got 2) #665
Comments
|
What version of netcdf4-Python are you using? I have a strong hunch this is the same issue as #662 |
|
I updated to 1.2.1 from pypi, it still fails. |
Did you try specifying a different engine to read the netcdf file? That might at least give you different error ;). On Mon, Nov 23, 2015 at 9:31 PM, naught101 [email protected]
|
Same problem with |
@shoyer: the file is publically available, have you tried checking it on your set-up? The file is about 35Mb.. |
OK, I just tried this out and this is a legit bug. The array that needs to be converted to time deltas is 2D, and pandas can't handle that. We need to flatten out the array in Any interest in putting together a pull request with a fix? |
Sorry, this is just something I stumbled across in a workshop, it's not a problem that's affecting my work, so I don't have much time for it. But I'll make the MOM developers aware of it - they might have an interest in helping out. |
No worries -- thanks for the bug report! I'm sure someone will get to this On Tue, Nov 24, 2015 at 2:15 PM, naught101 [email protected] wrote:
|
|
@spencerahill if you get a similar error with 2d latitude/longitude arrays please do report it in a separate issue. I'm pretty sure this one is specific to timedeltas. |
@shoyer Sure, just did: #667. |
@spencerahill I recall we only had this specific issue with the 2D time_bounds variable. Perhaps you have a specific example in mind, but in my experience xray handles reading in 2D lat and lon bounds variables OK. |
grab a copy of the file http://nh.id.au/data/ocean_vort.nc.gz, and gunzip it. It's a file with some ocean vorticity fields, from the MOM4 model. The
ncdump -h ocean_vort.nc
results don't look too odd to me.If I run:
I get the following error:
Any idea what might be causing that problem?
The text was updated successfully, but these errors were encountered: