<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>To help people migrate their
code bases from Python 2 to Python 3, the python interpreter has a handy
option '-3' that issues warnings at runtime. One of the warnings is
for integer division:<br><br>$ echo "print 3/2" > /tmp/foo.py<br>$ python -3 /tmp/foo.py<br>/tmp/foo.py:1: DeprecationWarning: classic int division<br> print 3/2<br>1<br><br></div>But no warnings are shown for division of numpy arrays, e.g. for a statement like this:<br>print np.array([3]) / np.array([2])<br><br></div>I
see that np.seterr can be used to issue certain types of division
warnings, but not this one. Is there a way to activate integer division
warnings? It would really help me migrate my application to Python 3.<br><br></div>Thanks,<br></div>Stuart</div>