-
Notifications
You must be signed in to change notification settings - Fork 259
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
Attributes clashing with reserved words are impossible to write #26
Comments
From whitaker.jeffrey@gmail.com on October 09, 2009 13:12:37 Stephen: Those are attributes used by the API itself, and not actually netcdf attributes written to the file. I don't -Jeff |
From stephen...@gmail.com on October 09, 2009 13:43:54 I propose keeping Dataset/Variable attribute behavior as is but adding another
I don't know how easy that would be in pyrex but I'll look into it. Stephen. |
From whitaker.jeffrey@gmail.com on October 13, 2009 11:01:32 Stephen: OK, I think I've fixed this. In SVN I've added setncattr and getncattr f.setncattr('dtype','double') whereas f.dtype = 'double' would fail before and f.dtype would always return the numpy dtype, even if there was a netcdf attribute Let me know if this works for you. -Jeff |
From stephen...@gmail.com on October 16, 2009 08:25:18 Looks good to me. Many thanks for this quick resolution. Stephen. |
From whitaker.jeffrey@gmail.com on October 16, 2009 09:55:26 Status: Fixed |
From stephen...@gmail.com on October 09, 2009 09:36:50
This is more a feature request than a bug as it's a problem all
Python->NetCDF bindings suffer. Apologies if this isn't the correct forum.
Attributes clashing with netCDF4 object properties and methods are
unsettable and must be read with getattr (as far as I can see). This
makes writing generic code on top of netCDF4 difficult. I'm sure it's only
a matter of time before I am asked to set a global attribute of
"file_format", "parent", "groups" or the like. What steps will reproduce the problem? $ ncdump test2.nc
netcdf test2 {
// global attributes:
:file_format = "my_format" ;
}
$ python
The attribute "file_format" is hidden from traditional attribute access
You can get at it with getattr
Stephen.Pascoe at stfc ac uk
Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=26
The text was updated successfully, but these errors were encountered: