From: Eric N. <no...@ph...> - 2001-10-12 17:39:48
|
The Numpy version of modulo uses a different sign convention for negative arguments than does Python itself: >>> -5 % 3 1 >>> array((-5,-5)) % 3 array([-2, -2]) (Numpy version 20.2.0, Python version 1.5.2 and version 2.2a4.) Is there a reason for this (hard to imagine), or is this a bug? Eric |