[SciPy-User] Glitch in the map_coordinates doc

Ralf Gommers ralf.gommers@googlemail....
Thu Aug 19 09:55:11 CDT 2010


On Wed, Aug 18, 2010 at 10:30 PM, Jean-Luc Menut <jeanluc.menut@free.fr>wrote:

> Hello all,
>
> In the map_coordinate reference document page
> (
> http://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.interpolation.map_coordinates.html
> ),
> there is this example :
>
>  >>> import scipy.ndimage
>  >>> a = np.arange(12.).reshape((4, 3))
>  >>> a
> array([[  0.,   1.,   2.],
>        [  3.,   4.,   5.],
>        [  6.,   7.,   8.],
>        [  9.,  10.,  11.]])
>  >>> sp.ndimage.map_coordinates(a, [[0.5, 2], [0.5, 1]], order=1)
> [ 2.  7.]
>
>
> According to the last line, import scipy.ndimage should be import scipy
> as sp.
>
> In all examples the lines "import scipy as sp" and "import numpy as np" are
assumed to have been executed, no need to repeat that in every docstring.
Subpackages like ndimage do need to be imported seperately. So the example
is fine. See http://projects.scipy.org/numpy/wiki/CodingStyleGuidelines.

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100819/f8742106/attachment.html 


More information about the SciPy-User mailing list