[Numpy-discussion] vander() docstring

Andreas Klöckner lists at informa.tiker.net
Wed Mar 26 19:22:56 EDT 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: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080326/c0f0dd0f/attachment.sig>


More information about the NumPy-Discussion mailing list