[Numpy-discussion] Can numpy catch this error for me?

Nathaniel Peterson nathanielpeterson08@gmail....
Tue Apr 7 15:27:05 CDT 2009

Thanks for the quick response.
In http://www.scipy.org/Cookbook/Indexing
I see

>>> a = C[1,2,3]
>>> a
>>> type(a)
<type 'numpy.int32'>
>>> type(int(a))
<type 'int'>
>>> a**a
Warning: overflow encountered in long_scalars
>>> int(a)**int(a)

This shows numpy can catch an overflow generated by a**a.
Why is it that numpy can catch this overflow,
but can not catch one generated by np.multiply.reduce?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090407/26aa653d/attachment.html 

More information about the Numpy-discussion mailing list