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

Pauli Virtanen pav at iki.fi
Wed Dec 29 14:54:03 EST 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