[Matrix-SIG] -1%2 = 1 and array([-1])%2 = array([-1]) Why?

Jean-Bernard ADDOR jbaddor@sca.uqam.ca
Fri, 12 Nov 1999 21:29:15 -0500 (EST)


Hey Numerical people!

I just tried the following:

>>> -1%2
1
>>> array([-1])%2
array([-1])

I would have expected array([+1]).

What is the philosophical reason Numerical should give another result than
nude python?

	Jean-Bernard

Python 1.5.1 (#1, Dec 17 1998, 20:58:15)  [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam

Debian python-numer 1.7-7.1