Re: [Numpy-discussion] Strange problem with h5py and numpy

2010-12-28 Thread Johannes Korn
On 28.12.2010 14:46, Darren Dale wrote:: On Mon, Dec 27, 2010 at 12:58 PM, Johannes Kornk...@freisingnet.de wrote: I try to read a bunch of hdf files in a loop. The problem is that I get an error at the second file because the file handle is of typeClosed HDF5 file The code you posted only

Re: [Numpy-discussion] Strange problem with h5py and numpy

2010-12-28 Thread Johannes Korn
On 28.12.2010 15:13, Johannes Korn wrote:: On 28.12.2010 14:46, Darren Dale wrote:: On Mon, Dec 27, 2010 at 12:58 PM, Johannes Kornk...@freisingnet.de wrote: I try to read a bunch of hdf files in a loop. The problem is that I get an error at the second file because the file handle is of

[Numpy-discussion] NumPy C-API equivalent of np.float64()

2010-12-28 Thread Keith Goodman
I'm looking for the C-API equivalent of the np.float64 function, something that I could use inline in a Cython function. I don't know how to write the function. Anyone have one sitting around? I'd like to use it, if it is faster than np.float64 (np.int32, np.float32, ...) in the Bottleneck

Re: [Numpy-discussion] NumPy C-API equivalent of np.float64()

2010-12-28 Thread John Salvatier
Wouldn't that be a cast? You do casts in Cython with double(expression) and that should be the equivalent of float64 I think. On Tue, Dec 28, 2010 at 3:32 PM, Keith Goodman kwgood...@gmail.com wrote: I'm looking for the C-API equivalent of the np.float64 function, something that I could use

Re: [Numpy-discussion] NumPy C-API equivalent of np.float64()

2010-12-28 Thread Robert Bradshaw
On Tue, Dec 28, 2010 at 8:10 PM, John Salvatier jsalv...@u.washington.edu wrote: Wouldn't that be a cast? You do casts in Cython with double(expression) and that should be the equivalent of float64 I think. Or even numpy.float64_t (expression) if you've cimported numpy (though as mentioned this