[Numpy-discussion] vander() docstring

Andreas Klöckner lists@informa.tiker....
Wed Mar 26 18:22:56 CDT 2008


Hi all,

The docstring for vander() seems to contradict what the function does. In 
particular, the columns in the vander() output seem reversed wrt its 
docstring. I feel like one of the two needs to be fixed, or is there 
something I'm not seeing?

This here is fresh from the Numpy examples page:

8< docstring -----------------------------------------------
X = vander(x,N=None)

The Vandermonde matrix of vector x.  The i-th column of X is the
the i-th power of x.  N is the maximum power to compute; if N is
None it defaults to len(x).

8< Example -------------------------------------------------
>>> from numpy import *
>>> x = array([1,2,3,5])
>>> N=3
>>> vander(x,N) # Vandermonde matrix of the vector x
array([[ 1,  1,  1],
[ 4,  2,  1],
[ 9,  3,  1],
[25,  5,  1]])
8< ---------------------------------------------------------

Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080326/c0f0dd0f/attachment.bin 


More information about the Numpy-discussion mailing list