[PYTHON MATRIX-SIG] Default Axes revisited
Perry A. Stoll
Fri, 30 Aug 1996 17:33:45 -0400 (EDT)
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 and
> what's a numeric operation, all numeric operations will have a "_" after
> 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?)
> Is everybody reasonably happy with this? - Jim
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: email@example.com
administrivia to: firstname.lastname@example.org