MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_zero_length

Function test_zero_length

tests/test_eigen_matrix.py:794–796  ·  view source on GitHub ↗

Ignore strides on a length-0 dimension (even if they would be incompatible length > 1)

(func, sizes)

Source from the content-addressed store, hash-verified

792@pytest.mark.parametrize("func", [m.iss738_f1, m.iss738_f2])
793@pytest.mark.parametrize("sizes", [(0, 2), (2, 0)])
794def test_zero_length(func, sizes):
795 """Ignore strides on a length-0 dimension (even if they would be incompatible length > 1)"""
796 assert np.all(func(np.zeros(sizes)) == np.zeros(sizes))
797
798
799def test_issue1105():

Callers

nothing calls this directly

Calls 1

funcFunction · 0.70

Tested by

no test coverage detected