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

Function test_array_unchecked_dyn_dims

tests/test_numpy_array.py:455–464  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

453
454
455def test_array_unchecked_dyn_dims():
456 z1 = np.array([[1, 2], [3, 4]], dtype="float64")
457 m.proxy_add2_dyn(z1, 10)
458 assert np.all(z1 == [[11, 12], [13, 14]])
459
460 expect_c = np.ndarray(shape=(3, 3, 3), buffer=np.array(range(3, 30)), dtype="int")
461 assert np.all(m.proxy_init3_dyn(3.0) == expect_c)
462
463 assert m.proxy_auxiliaries2_dyn(z1) == [11, 11, True, 2, 8, 2, 2, 4, 32]
464 assert m.proxy_auxiliaries2_dyn(z1) == m.array_auxiliaries2(z1)
465
466
467def test_array_failure():

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.80

Tested by

no test coverage detected