[Numpy-discussion] NumPy C-API equivalent of np.float64()
Matthew Brett
matthew.brett at gmail.com
Wed Dec 29 13:13:09 EST 2010
>> Forgive me if I haven't understood your question, but can you use
>> PyArray_DescrFromType with e.g NPY_FLOAT64 ?
>
> I'm pretty hopeless here. I don't know how to put all that together in
> a function.
That might be because I'm not understanding you very well, but I was
thinking that:
cdef dtype descr = PyArray_DescrFromType(NPY_FLOAT64)
would give you the float64 dtype that I thought you wanted? I'm
shooting from the hip here, in between nieces competing for the
computer and my attention.
See you,
Matthew
More information about the NumPy-Discussion
mailing list