[Numpy-discussion] patching docs
william ratcliff
william.ratcliff at gmail.com
Fri Apr 24 12:12:07 EDT 2009
Actually, if I look here:
http://docs.scipy.org/numpy/docs/numpy.core.fromnumeric.put/
The text that appears in by browser is:
*put(a, ind, v, mode='raise')*
Changes specific elements of one array by replacing from another array.
The indexing works on the flattened target array,
put<http://docs.scipy.org/numpy/docs/numpy.core.fromnumeric.put/#put>is
roughly equivalent to:
for i, val in zip(ind, v):
x.flat[i] = val
Am I missing something obvious????
cheers,
William
On Fri, Apr 24, 2009 at 9:43 AM, Joe Harrington <jh at physics.ucf.edu> wrote:
> william ratcliff <william.ratcliff at gmail.com> writes:
>
> > Hi! I'd like to suggest a patch for:
> > numpy <http://docs.scipy.org/numpy/docs/numpy/>.core<
> http://docs.scipy.org/numpy/docs/numpy.core/>
> > .fromnumeric <http://docs.scipy.org/numpy/docs/numpy.core.fromnumeric/
> >.put
> > The docstring contains:
>
> > for i, val in zip(ind,v):
> > x.flat[i]=val
>
> > It should be:
>
> > for i, val in zip(ind,v):
> > a.flat[i]=val
>
> Thanks!
>
> It appears you are basing your patch on a numpy release rather than
> the wiki you have actually linked to, as this problem was fixed on
> 2009-03-16 by Ralf Gommers.
>
> > This would be more consistent with the rest of the docstring. For the
> > future, is there an easy way for us to patch docstrings?
>
> Sure! Follow the instructions on docs.scipy.org/numpy/ and make
> yourself a doc wiki account. Post the account name to the scipy-dev
> mailing list and ask to be made an editor. Then please edit! But,
> please be careful that you develop any changes based on the current
> docstrings and not something from a release. Because the releases are
> snapshots of a fast-moving project, they are often out of date (In
> fact, I tell my students to use the doc wiki as their best source of
> docs, and to ignore help()).
>
> Thanks again,
>
> --jh--
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090424/72203f99/attachment.html>
More information about the NumPy-Discussion
mailing list