Skip to content
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

when shape is unexpected, pynio return "check dtype" #39

Open
mektpoy opened this issue Apr 5, 2020 · 1 comment
Open

when shape is unexpected, pynio return "check dtype" #39

mektpoy opened this issue Apr 5, 2020 · 1 comment

Comments

@mektpoy
Copy link

mektpoy commented Apr 5, 2020

The error is:

Traceback (most recent call last):
File "interp2d.py", line 60, in
outf.variables['lat'].assign_value(ersst_lat)
File "/etc/anaconda2/envs/ml/lib/python3.8/site-packages/PyNIO/Nio.py", line 444, in assign_value
self._obj.assign_value(value)
Nio.NIOError: failed to write array (check dtype)

but acctually this caused by wrong numpy.shape

@changemode
Copy link

Maybe, You can check data type.I use the np.zeros find the list default type is float64 and i can not write in nc file , so i change the np.zeros dtype is float32, its OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants