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

Method _zeros

numpy/_core/tests/test_multiarray.py:1948–1955  ·  view source on GitHub ↗
(shape, dtype=str)

Source from the content-addressed store, hash-verified

1946class TestZeroSizeFlexible:
1947 @staticmethod
1948 def _zeros(shape, dtype=str):
1949 dtype = np.dtype(dtype)
1950 if dtype == np.void:
1951 return np.zeros(shape, dtype=(dtype, 0))
1952
1953 # not constructable directly
1954 dtype = np.dtype([('x', dtype, 0)])
1955 return np.zeros(shape, dtype=dtype)['x']
1956
1957 def test_create(self):
1958 zs = self._zeros(10, bytes)

Callers 6

test_createMethod · 0.95
_test_sort_partitionMethod · 0.95
test_resizeMethod · 0.95
test_viewMethod · 0.95
test_dumpsMethod · 0.95
test_pickleMethod · 0.95

Calls 1

dtypeMethod · 0.45

Tested by

no test coverage detected