[Matrix-SIG] Perplexing comparisons

Charles G Waldman cgw@pgt.com
11 Sep 1998 16:02:24 -0400


The following message is a courtesy copy of an article
that has been posted to comp.lang.python as well.


Can anyone enlighten me as to what's going on here? 

Python 1.5 (#13, Sep  9 1998, 15:58:11)  [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> t1 = (150,0,1)
>>> t2 = (149,1,0)
>>> t1<t2
0
>>> t2<t1
1
>>> t1>t2
1
>>> t2>t1
0
>>> a1,a2 = array(t1),array(t2)
>>> a1<a2
1
>>> a2<a1
1
>>> a1>a2
0
>>> a2>a1
0