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 instead of from numpy.linalg import rank
For a package you control, you should really prevent this type of user mistake. > 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 > _______________________________________________ > 0 Actually I do interpret rank in terms of linear algebra definition, but obviously other people have other meanings. I Bruce _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion