[PYTHON MATRIX-SIG] Default Axes revisited
Fri, 30 Aug 1996 17:39:13 -0400
> On Fri, 30 Aug 1996, Jim Hugunin wrote:
> > Structural Operations have a default axis of 0
> > Numeric/Computational Operations have a default axis of -1
> Sounds good to me. I recently understood this and completely agree. Does
> this mean that all functions that can operate on different axes will have
> an "axis" keyword?
> > However, because I don't think it's always obvious what's a structural
> > what's a numeric operation, all numeric operations will have a "_"
> > their name.
> > So we have:
> > take, concatenate, ...
> > argmax_, sort_, argsort_, fft_, ...
> > I will also probably define functions of the form:
> > def argmax(x,y=None):
> > raise AttributeError, "argmax is a Numeric function, use argmax_"
> But these imposter functions should exactly the same signature as their
> shadowed brethren. (Just checking - wouldn't there be an "axis" keyword
> as per the question above?)
argmax takes a single argument. y=None is my way of handling the default
axis argument. I will use the word axis there in the real version.
> > Is everybody reasonably happy with this? - Jim
If I can get all interested parties to say that I'll be happy.
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org