[Numpy-discussion] longlong format error with Python <= 2.6 in scalartypes.c

2011-08-04 Thread Derek Homeier
Hi, commits c15a807e and c135371e (thus most immediately addressed to Mark, but I am sending this to the list hoping for more insight on the issue) introduce a test failure with Python 2.5+2.6 on Mac: FAIL: test_timedelta_scalar_construction (test_datetime.TestDateTime)

Re: [Numpy-discussion] Reading a big netcdf file

2011-08-04 Thread Christopher Barker
On 8/4/11 10:02 AM, Christopher Barker wrote: > On 8/4/11 8:53 AM, Jeff Whitaker wrote: >> Kiko: I think the difference may be that when you read the data with >> netcdf4-python, it tries to unpack the short integers to a float32 >> array. > > Jeff, why is that? is it an netcdf4 convention? I alway

Re: [Numpy-discussion] Reading a big netcdf file

2011-08-04 Thread Christopher Barker
On 8/3/11 3:56 PM, Gökhan Sever wrote: > Back to the reality. After clearing the cache using Warren's suggestion: > > In [1]: timeit -n1 -r1 a = np.fromfile('temp.npa', dtype=np.uint16) > 1 loops, best of 1: 7.23 s per loop yup -- that cache sure can be handy! -Chris -- Christopher Barker, Ph.

Re: [Numpy-discussion] Reading a big netcdf file

2011-08-04 Thread Christopher Barker
On 8/4/11 3:46 AM, Kiko wrote: > In [9]: z4 = gebco4.variables['z'] > > I got no problems and I have: > > In [14]: type(z4); z4.shape; z4.size > Out[14]: > Out[14]: (233312401,) > Out[14]: 233312401 > > But if I do: > > In [15]: z4 = gebco4.variables['z'][:] > MemoryError > What's the difference

Re: [Numpy-discussion] Reading a big netcdf file

2011-08-04 Thread Jeff Whitaker
On 8/4/11 4:46 AM, Kiko wrote: Hi, all. Thank you very much for your replies. I am obtaining some issues. If I use netcdf4-python or scipy.io.netcdf libraries: In [4]: import netCDF4 as n4 In [5]: from scipy.io import netcdf as nS In [6]: import numpy as np In [7]: gebco4 =

Re: [Numpy-discussion] Reading a big netcdf file

2011-08-04 Thread Kiko
Hi, all. Thank you very much for your replies. I am obtaining some issues. If I use netcdf4-python or scipy.io.netcdf libraries: In [4]: import netCDF4 as n4 In [5]: from scipy.io import netcdf as nS In [6]: import numpy as np In [7]: gebco4 = n4.Dataset('GridOne.grd', 'r') In [8]: gebcoS = nS.n