MCPcopy Index your code
hub / github.com/numpy/numpy / shape

Method shape

numpy/lib/_arrayterator_impl.py:170–178  ·  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

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

Callers 3

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