[PYTHON MATRIX-SIG] Final conventions for alpha2

Konrad HINSEN hinsenk@ere.umontreal.ca
Fri, 16 Aug 1996 14:25:59 -0400

> > If we settle for a single default for every function (which I still
> > consider a bad solution), the best test would be to write a lot
> > of code with explicit axis specifications for everything and then
> > count which one occurs most often. I bet that is going to be zero.
> I happen to disagree with you about what such a comparision would
> reveal, but I could see the value in performing it.

That's why I looked at all my code, and found that with a default
of -1 I'd have to add axis specifications to 80% of all function calls.
With a default of 0 I couldn't find any code that would need modification.
I don't claim that my code is representative, but I want to see the
code that benefits from a default of -1 before I believe in its

> Okay, here's an example of my problems:
> argmax(x) has a natural default axis of -1, right?
> So, what is the natural default axis of maximum.reduce(x)?  If it's not
> also -1, I'd argue that you have a confusing situation.

Why? argmax() and maximum.reduce() are two very different things.
Any reduction is a structural operation with a default of zero.
argmax() is not a reduction, and also returns very different
information (an index rather than an array element).


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