Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81026
| From | Dave Angel <davea@davea.name> |
|---|---|
| Subject | Re:scipy shape |
| Date | 2014-11-19 02:25 -0500 |
| Organization | news.gmane.org |
| References | <CAA+hu4VH+VqmeVnFhEVdDSLuj0xXH41OCxt5WgOFJ2ZnUycoOA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15990.1416381908.18130.python-list@python.org> (permalink) |
Abdul Abdul <abdul.sw84@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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re:scipy shape Dave Angel <davea@davea.name> - 2014-11-19 02:25 -0500
csiph-web