[SciPy-user] scipy choice of defaults for matrix manipulation

Travis Oliphant oliphant at ee.byu.edu
Thu Aug 5 23:05:57 EDT 2004


Alan G Isaac wrote:

>Looking at briefly at Numeric and numarray, it seems they
>have made an effort to standardize on axis=0.  This is also
>true in the Matlab module.  Wouldn't it be wise for SciPy
>to join the parade?  (I.e., shouldn't these closely related
>and interdependent packages share a convention?
>Otherwise, this is going to be VERY confusing for users.
>(As it was for me.)  Now when I call a such a function,
>I have to remember: is it a SciPy function, or a
>Numeric/numarray function?  Not a good situation, right?
>  
>
This is only true for some functions,  others have axis=-1.

SciPy came before numarray and we tried to standardize the Numeric 
functions.  The vision of SciPy is that you would have no need to call a 
Numeric function.  You would always call the SciPy function.

We have been trying to standardize on axis=-1 to prevent this very 
confusion you are having.   The existence of numarray is actually 
confusing the situation, because numarray is more than just an array 
object it is also re-inventing several of the array operations that are 
already in SciPy.   At this point you should ignore the MATLAB module as 
it is completely obsolete and is a way watered-down version of what 
SciPy is becoming.

This is fragmenting the community and is not a good thing in my 
opinion.   You may make a case for which standard is appropriate but the 
axis=-1 was decided on after some deliberation.  It is open for discussion.

-Travis O.






More information about the SciPy-User mailing list