[PYTHON MATRIX-SIG] RubberIndex

Konrad HINSEN hinsenk@ere.umontreal.ca
Wed, 14 Feb 1996 13:31:31 -0500


   It would be better to have an iterator method that would allow one to
   access regular sub-arrays.  At the minimum it would allow you to
   specify iteration along any chosen dimension (i.e. a.iterator(dim)).
   I am not sure how to extend it to allow iterating over other
   sub-arrays (e.g. 2x2 sub-matrices).

That should certainly be available, but that was not my point...

   Konrad> Also, most array functions accept nested lists as well as arrays.
   Konrad> I'd like to keep this analogy as far as possible.

   Generating an error when using too few indexes when subscripting an
   array does not prohibit using nested lists as arguments to array
   functions.

That wasn't my point either. My point is that since arrays and nested
lists are treated as interchangeable in many situations, it makes
sense to use this analogy as much as possible and allow an indexing
scheme for arrays that matches that for nested arrays. WHich means
that it should always be allowed to have just one index, independent
of the rank of the array.

-------------------------------------------------------------------------------
Konrad Hinsen                     | E-Mail: hinsenk@ere.umontreal.ca
Departement de chimie             | Tel.: +1-514-343-6111 ext. 3953
Universite de Montreal            | Fax:  +1-514-343-7586
C.P. 6128, succ. Centre-Ville     | Deutsch/Esperanto/English/Nederlands/
Montreal (QC) H3C 3J7             | Francais (phase experimentale)
-------------------------------------------------------------------------------

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

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