[Numpy-discussion] [ANN] NumPy 0.9.6 released

Fernando Perez Fernando.Perez at colorado.edu
Tue Mar 14 13:41:02 CST 2006


Travis Oliphant wrote:
> This post is to announce the release of NumPy 0.9.6 which fixes some 
> important bugs and has several speed improvments.

Just curious about the svd/singular... pair:

In [2]: numpy.linalg.singular_value_decomposition??
Definition:     numpy.linalg.singular_value_decomposition(A, full_matrices=0)
Source:
def singular_value_decomposition(A, full_matrices=0):
     return svd(A, full_matrices)


In [3]: numpy.linalg.svd?
Definition:     numpy.linalg.svd(a, full_matrices=1)


Do we really need both spellings to be different just on the default of the 
full_matrices flag?  It seems to me like the kind of unnecessary 
special-casing that just forces people to remember little details without a 
clear benefit.  If we want a long-spelling form, it would be cheaper to simply 
alias the name with a module-level

singular_value_decomposition = svd

so the same /object/ is referred to via both names.

Perhaps I'm missing the blindingly obvious solid reason, but if this  is just 
historical accident, I'd vote for unifying the two simply as spelling 
variants.  I think the flipped default is more confusion-prone than beneficial.

Cheers,

f




More information about the Numpy-discussion mailing list