[PYTHON MATRIX-SIG] Comparisons

Rob Hooft Rob.Hooft@EMBL-Heidelberg.de
Wed, 3 Apr 1996 12:23:39 +0200


Hi,

I just subscribed to this list this week, and have spend a few
evenings reading the 1.8MB archive.... I haven't even compiled the
software yet, and still I'd like to mention something that surprised
me in the discussions so far.

Repeatedly there has been a discussion about "<" and ">" comparisons
for Array objects. Why can that not be implemented in the "dictionary"
way? It just needs to be made recursive. Like:

   a<b if:
      (a[0]<b[0]) or
      (a[0]==b[0] and (a[1]<b[1] or len(a)=1)) or
      ....

Maybe needs to be ironed out if len(a.shape) is different from
len(b.shape), the types of the arrays differ, or if complex numbers
are involved.

Congratulations with the efforts! I'll be trying to compile 0.35 soon. 

Regards,

Rob.

-- 
=== Rob.Hooft@EMBL-Heidelberg.DE   http://www.Sander.EMBL-Heidelberg.DE/rob/ ==
==== In need of protein modeling?  http://www.Sander.EMBL-Heidelberg.DE/whatif/
Validation of protein structures?  http://biotech.EMBL-Heidelberg.DE:8400/ ====
================ Long Live Linux!  Free Software Rules The World! =============

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================