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

Method test_reshape_zero_strides

numpy/_core/tests/test_regression.py:650–654  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

648 assert_equal(b.reshape(2, 2, order='F'), [[2, 6], [4, 8]])
649
650 def test_reshape_zero_strides(self):
651 # Issue #380, test reshaping of zero strided arrays
652 a = np.ones(1)
653 a = as_strided(a, shape=(5,), strides=(0,))
654 assert_(a.reshape(5, 1).strides[0] == 0)
655
656 def test_reshape_zero_size(self):
657 # GitHub Issue #2700, setting shape failed for 0-sized arrays

Callers

nothing calls this directly

Calls 3

as_stridedFunction · 0.90
assert_Function · 0.90
reshapeMethod · 0.80

Tested by

no test coverage detected