[PYTHON MATRIX-SIG] Final conventions for alpha2

Jim Hugunin hugunin@mit.edu
Fri, 16 Aug 1996 14:18:08 -0400


Konrad HINSEN wrote:

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

> > And one of my greatest complaints with J is similar to the complaints
> > you are always hearing about perl, it makes for very concise but hard to
> > read code.  Python has always made the tradeoff for greater readability
> 
> But for different reasons. BTW, I don't particularly like J either;
> I can never remember all the funny symbols after not using them for
> two days. But I never had problems with remembering the default ranks,
> because in almost all cases you can deduce them by considering the
> most typical application of a function. Basically, the default
> should be zero for structural operations, -1 for non-structural
> operations acting on vectors, and -2 for non-structural operations
> acting on matrices (e.g. inversion). I don't think this is difficult
> to remember, and I can't think of a function for which the answer
> according to this rule is not obvious.

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.

-Jim

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

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