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

Pauli Virtanen pav@iki...
Wed Dec 29 13:54:03 CST 2010


Keith Goodman wrote:
> np.float64 is fast, just hoping someone had a C-API inline version of
> np.float64() that is faster.

You're looking for PyArrayScalar_New and _ASSIGN.
See https://github.com/numpy/numpy/blob/master/numpy/core/include/numpy/arrayscalars.h

Undocumented (bad), but AFAIK public.



More information about the NumPy-Discussion mailing list