MCPcopy Create free account
hub / github.com/numpy/numpy / shape

Method shape

numpy/lib/arrayterator.py:165–173  ·  view source on GitHub ↗

The shape of the array to be iterated over. For an example, see `Arrayterator`.

(self)

Source from the content-addressed store, hash-verified

163
164 @property
165 def shape(self):
166 """
167 The shape of the array to be iterated over.
168
169 For an example, see `Arrayterator`.
170
171 """
172 return tuple(((stop-start-1)//step+1) for start, stop, step in
173 zip(self.start, self.stop, self.step))
174
175 def __iter__(self):
176 # Skip arrays with degenerate dimensions

Callers 4

test_basic_keepdimsMethod · 0.45
test_keepdims_outMethod · 0.45
test_keepdims_outMethod · 0.45

Calls

no outgoing calls

Tested by 3

test_basic_keepdimsMethod · 0.36
test_keepdims_outMethod · 0.36
test_keepdims_outMethod · 0.36