[Numpy-discussion] Proposal for matrix_rank function in numpy
Tue Dec 15 13:24:43 CST 2009
On 12/15/2009 12:47 PM, Alan G Isaac wrote:
> On 12/15/2009 1:39 PM, Bruce Southey wrote:
>> +1 for the function but we can not shorten the name because of existing
>> numpy.rank() function.
> 1. Is it a rule that there cannot be a name duplication
> in this different namespace?
In my view this is still the same numpy namespace. An example of the
potential problems is just using an incorrect import statement somewhere:
from numpy import rank
from numpy.linalg import rank
For a package you control, you should really prevent this type of user
> 2. Is there a commitment to keeping both np.rank and np.ndim?
> (I.e., can np.rank never be deprecated?)
I do not see that is practical because of the number of releases to
actually remove a function.
Also the current rank function has existed for a very long time in
Numerical Python (as it is present in Numeric). So it could be confusing
for a user to think that the function just has been moved rather than
being a different function.
> If the answers are both 'yes',
> then perhaps linalg.rank2d is a possible shorter name.
> Alan Isaac
Actually I do interpret rank in terms of linear algebra definition, but
obviously other people have other meanings. I
More information about the NumPy-Discussion