[Matrix-SIG] min/max question and strange result

Bruce Duncan bsd@scripps.edu
Tue, 12 May 1998 17:21:49 -0700 (PDT)


With python 1.5 on an SGI, I get the following: 

>>> a = Numeric.array((-1,0,1))
>>> a
array([-1,  0,  1])
>>> min(a)
-1
>>> max(a)
1
>>> a.shape
(3,)
>>> a.shape = (3,1)
>>> a
array([[-1],
       [ 0],
       [ 1]])
>>> min(a)
array([1])
>>> max(a)
array([-1])


This seems odd.
Why is [-1] greater than [1] ??

-bsd-

Bruce Duncan
The Scripps Research Institute 
bsd "is located at" scripps "in the domain" edu  # anti spam...