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

Method __init__

numpy/lib/index_tricks.py:663–669  ·  view source on GitHub ↗
(self, *shape)

Source from the content-addressed store, hash-verified

661 """
662
663 def __init__(self, *shape):
664 if len(shape) == 1 and isinstance(shape[0], tuple):
665 shape = shape[0]
666 x = as_strided(_nx.zeros(1), shape=shape,
667 strides=_nx.zeros_like(shape))
668 self._it = _nx.nditer(x, flags=['multi_index', 'zerosize_ok'],
669 order='C')
670
671 def __iter__(self):
672 return self

Callers

nothing calls this directly

Calls 1

as_stridedFunction · 0.90

Tested by

no test coverage detected