Closed GoogleCodeExporter closed 8 years ago
The problem seems to be with the automatic conversion of missing values to
masked values. If you turn this off, like this:
>>> from netCDF4 import Dataset
>>> nc = Dataset('toto.nc')
>>> v = nc.groups['Sounding'].variables['gain']
>>> v.set_auto_maskandscale(False)
>>> v[:]
array(['H', 'H....
all is well. On the other hand, using the default setup an error is raised
>>> v.set_auto_maskandscale(True)
>>> v[:]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "netCDF4.pyx", line 2792, in netCDF4.Variable.__getitem__ (netCDF4.c:34831)
data = self._toma(data)
File "netCDF4.pyx", line 2820, in netCDF4.Variable._toma (netCDF4.c:35353)
if mval.shape == () and numpy.isnan(mval):
TypeError: Not implemented for this type
This should be easy to fix, but as a workaround you can just set the
set_auto_maskandscale variable method to turn off auto-masking.
Original comment by whitaker.jeffrey@gmail.com
on 5 Nov 2013 at 5:14
Fix is now in svn.
Original comment by whitaker.jeffrey@gmail.com
on 5 Nov 2013 at 5:25
Thanks mate !!!
Original comment by sebastie...@gmail.com
on 12 Nov 2013 at 3:03
Original comment by whitaker.jeffrey@gmail.com
on 26 Feb 2014 at 2:04
Original issue reported on code.google.com by
sebastie...@gmail.com
on 5 Nov 2013 at 3:46Attachments: