[PYTHON MATRIX-SIG] returning scalars or rank-0 arrays..

Konrad HINSEN hinsenk@ere.umontreal.ca
Tue, 20 Feb 1996 15:15:39 -0500


   One issue I've come accross is the "what do I return, a rank-0 entity or
   a scalar?".  My understanding of the current scheme is that indexing
   returns scalars, while slicing returns ranked entities, even if that
   rank is 0.  Is that correct?

I am not sure what the current implementation does, but the idea was
that rank-0 arrays should always automatically be converted to
scalars.

-------------------------------------------------------------------------------
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
=================