3 Jul
2019
3 Jul
'19
3:03 p.m.
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
1731
Age (days ago)
1731
Last active (days ago)
5 comments
4 participants
participants (4)
-
Charles R Harris
-
Hameer Abbasi
-
Matthew Brett
-
Nicolas Rougier