Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81026 > unrolled thread
| Started by | Dave Angel <davea@davea.name> |
|---|---|
| First post | 2014-11-19 02:25 -0500 |
| Last post | 2014-11-19 02:25 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re:scipy shape Dave Angel <davea@davea.name> - 2014-11-19 02:25 -0500
| From | Dave Angel <davea@davea.name> |
|---|---|
| Date | 2014-11-19 02:25 -0500 |
| Subject | Re:scipy shape |
| Message-ID | <mailman.15990.1416381908.18130.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web