2013-08-08 18:20:35 |
Julian Taylor |
description |
in 0.11 reading netcdf files results in integer data in big endian format, this was fixed in 0.12:
https://github.com/scipy/scipy/pull/471
TESTCASE:
run:
from scipy.io import netcdf
import numpy as np
nc = netcdf.netcdf_file('foo.nc', 'w')
nc.createDimension('time', 10)
time = nc.createVariable('time', 'i', ('time',))
time[:] = np.arange(10)
time.units = 'days since 2008-01-01'
nc.close()
nc = netcdf.netcdf_file('foo.nc', 'r')
print nc.variables['time'].data
result
[ 0 16777216 33554432 50331648 67108864 83886080 100663296
117440512 134217728 150994944]
expected result:
[0 1 2 3 4 5 6 7 8 9]
Regression potential:
low, the netcdf spec says the data must big endian and the patch only fixes this issue. |
in 0.11 reading netcdf files results in integer data in big endian format interpreted as native endian, this was fixed in 0.12:
https://github.com/scipy/scipy/pull/471
TESTCASE:
run:
from scipy.io import netcdf
import numpy as np
nc = netcdf.netcdf_file('foo.nc', 'w')
nc.createDimension('time', 10)
time = nc.createVariable('time', 'i', ('time',))
time[:] = np.arange(10)
time.units = 'days since 2008-01-01'
nc.close()
nc = netcdf.netcdf_file('foo.nc', 'r')
print nc.variables['time'].data
result
[ 0 16777216 33554432 50331648 67108864 83886080 100663296
117440512 134217728 150994944]
expected result:
[0 1 2 3 4 5 6 7 8 9]
Regression potential:
low, the netcdf spec says the data must big endian and the patch only fixes this issue. |
|