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

Function assert_equal_tensor_ref

tests/test_eigen_tensor.py:54–61  ·  view source on GitHub ↗
(mat, writeable=True, modified=None)

Source from the content-addressed store, hash-verified

52
53
54def assert_equal_tensor_ref(mat, writeable=True, modified=None):
55 assert mat.flags.writeable == writeable
56
57 copy = np.array(tensor_ref)
58 if modified is not None:
59 copy[indices] = modified
60
61 np.testing.assert_array_equal(mat, copy)
62
63
64@pytest.mark.parametrize("m", submodules)

Calls 1

arrayMethod · 0.80

Tested by

no test coverage detected