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 wrote: > Wouldn't that be a cast? You do casts in Cython with (expression) > and that should be the equivalent of float64 I think. Or even (expression) if you've cimported numpy (though as mentioned this is the same as double on every platform I kno

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 (expression) and that should be the equivalent of float64 I think. On Tue, Dec 28, 2010 at 3:32 PM, Keith Goodman wrote: > I'm looking for the C-API equivalent of the np.float64 function, > something that I could use inline in a Cython functio

[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 package

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 Korn 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 type>> HDF5 f

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 Korn 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 type> HDF5 file> > > The code you posted only involves one file

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

2010-12-28 Thread Darren Dale
On Mon, Dec 27, 2010 at 12:58 PM, Johannes Korn wrote: > Hi, > > I have a strange problem with h5py or with numpy. I think this question belongs on the h5py mailing list. > 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 hand