Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #81026 > unrolled thread

Re:scipy shape

Started byDave Angel <davea@davea.name>
First post2014-11-19 02:25 -0500
Last post2014-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.


Contents

  Re:scipy shape Dave Angel <davea@davea.name> - 2014-11-19 02:25 -0500

#81026 — Re:scipy shape

FromDave Angel <davea@davea.name>
Date2014-11-19 02:25 -0500
SubjectRe: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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web