On Tue, Dec 28, 2010 at 8:10 PM, John Salvatier <[email protected]> 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 is the same as double on every platform I know of). Even easier is just to use the expression in a the right context and it will convert it for you. - Robert > On Tue, Dec 28, 2010 at 3:32 PM, Keith Goodman <[email protected]> wrote: >> >> 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 when the output is a >> scalar, for example bn.median(arr, axis=None). >> _______________________________________________ >> NumPy-Discussion mailing list >> [email protected] >> http://mail.scipy.org/mailman/listinfo/numpy-discussion > > > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
