[Numpy-discussion] Returning the same dtype in Cython as np.argmax

Keith Goodman kwgoodman@gmail....
Fri Jun 10 11:18:31 CDT 2011


On Wed, Jun 8, 2011 at 9:49 PM, Travis Oliphant <oliphant@enthought.com> wrote:
> On Jun 7, 2011, at 3:17 PM, Keith Goodman wrote:
>> What is the rule to determine the dtype returned by numpy functions
>> that return indices such as np.argmax?
>
> The return type of indices will be np.intp.

Thanks, Travis. I now know a little more about NumPy.

> I don't know if Cython provides that type or not.   If not, then it is either np.int32 or np.int64 depending on the system.

This part was answered on the cython list:

http://groups.google.com/group/cython-users/browse_thread/thread/f8022ee7ccbf7c5b

Short answer is that it is not part of cython 0.14.1 but it is easy to add.


More information about the NumPy-Discussion mailing list