This one comes up in a Java puzzler, but applies equally to numpy.

http://www.youtube.com/watch?v=wDN_EYUvUq0 >>> import numpy, sys

>>> abs(numpy.array([-sys.maxint-1],numpy.int)) > 0

array([False], dtype=bool)

>>> abs(numpy.array([-129,-128,-127],numpy.int8)) > 0

array([ True, False, True], dtype=bool)

... etc. Sort of surprising that abs gives something negative. Is this

the intended behaviour as covered by a unit test and doc already?

-Jon

_______________________________________________

Numpy-discussion mailing list

[hidden email]
http://projects.scipy.org/mailman/listinfo/numpy-discussion