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

Function test_method_vectorization

tests/test_numpy_vectorize.py:243–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241
242
243def test_method_vectorization():
244 o = m.VectorizeTestClass(3)
245 x = np.array([1, 2], dtype="int")
246 y = np.array([[10], [20]], dtype="float32")
247 assert np.all(o.method(x, y) == [[14, 15], [24, 25]])
248
249
250def test_ref_qualified_method_vectorization():

Callers

nothing calls this directly

Calls 3

methodMethod · 0.95
VectorizeTestClassMethod · 0.80
arrayMethod · 0.80

Tested by

no test coverage detected