-
Notifications
You must be signed in to change notification settings - Fork 267
Description
From cjgoh...@gmail.com on January 09, 2013 07:26:13
I get many test errors (attached) when using netcdf4-python 1.0.2 (from svn trunk) with netcdf lib 4.2.3 (from svn trunk) on win-amd64-py2.7. The netcdf lib itself passes all but one test. Most netcdf4-python test errors are of the following kind:
ERROR: runTest (tst_atts.VariablesTestCase)
testing attributes
Traceback (most recent call last):
File "D:\Dev\Compile\netCDF4\netcdf4-svn\test\tst_atts.py", line 39, in setUp
f.intatt = INTATT
File "netCDF4.pyx", line 1791, in netCDF4.Dataset.setattr (netCDF4.c:20402)
File "netCDF4.pyx", line 1737, in netCDF4.Dataset.setncattr (netCDF4.c:19828)
File "netCDF4.pyx", line 1016, in netCDF4._set_att (netCDF4.c:13352)
TypeError: illegal data type for attribute, must be one of ['i8', 'f4', 'u8', 'i1', 'U1', 'S1', 'i2', 'u1', 'i4', 'u2', 'f8', 'u4'], got i
The problem is that dtype.str[1:]
unexpectedly returns dtype.str[1:-1]
, excluding the last character. dtype.str
itself seems correct.
E.g. at < http://code.google.com/p/netcdf4-python/source/browse/trunk/netCDF4.pyx#1015 >
These errors do not occur when using netcdf lib 4.1.3 and the exact same netcdf4-python, python, hdf5, numpy, cython, curl, and compiler versions.
The netcdf lib code is at < http://svn.unidata.ucar.edu/repos/netcdf/trunk >
Attachment: netcdf4-tests.txt
Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=158