
Oct. 12, 2001
6:03 p.m.
On Fri, 12 Oct 2001, Eric Nodwell wrote:
Numpy delegates to the C platform's / and % operators, Python does it "right". Wouldn't it be preferable to change Numpy so it is also "right"?
Speed. In Python, there's so much overhead from symbol resolution, looking up __mod__s and __rmod__s and whatnot that the extra work is lost in the noise. Numpy would take a bigger hit when working with large arrays. One could always write python_compatible_div and python_compatible_mod functions, if one wanted. Could even submit a patch to add them, if truly motivated. Warren Focke