Hi,

I’m a bit surprised with the following code:

>>> import numpy as np
>>> np.seterr(all='warn')
>>> Z = np.array([-128], dtype=np.byte)
>>> print(np.abs(Z))
[-128]

Obviously, it does not return the absolute value and I get no warning.
Is it something expected ? (numpy 1.16.4, python 3.7.3)


Nicolas
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion

Reply via email to