scipy shape
Dave Angel
davea at davea.name
Wed Nov 19 02:25:16 EST 2014
Abdul Abdul <abdul.sw84 at gmail.com> Wrote in message:
> I came across an example that starts as follows:
>
> from scipy.ndimage import filters
> img = zeros(im.shape)
>
> What does the second line mean here? Is it setting the image pixels to zero? What is "shape" here?
>
This example is incomplete. Neither zeros nor im are defined in
the python versions I have installed, and shape is an attribute
of im, whatever type that is.
Your example needs at least another import, probably like
from numpy import zeros
http://docs.scipy.org/doc/numpy/reference/generated/numpy.zeros.html
But I can't guess what im might be, unless it's some numpy instance.
The other thing missing from the example is the python version.
--
DaveA
More information about the Python-list
mailing list