MCPcopy Create free account
hub / github.com/apache/arrow / test_dlpack_versioned_roundtrip

Function test_dlpack_versioned_roundtrip

python/pyarrow/tests/test_dlpack.py:309–314  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

307@check_bytes_allocated
308@pytest.mark.parametrize('obj', dlpack_objects())
309def test_dlpack_versioned_roundtrip(obj):
310 expected = np.from_dlpack(DLPackForwarder(obj, max_version=None))
311 for copy in [None, False, True]:
312 result = np.from_dlpack(
313 DLPackForwarder(obj, max_version=(1, 0), copy=copy))
314 np.testing.assert_array_equal(result, expected, strict=True)
315
316
317@requires_numpy_version("2.2.5")

Callers

nothing calls this directly

Calls 1

DLPackForwarderClass · 0.85

Tested by

no test coverage detected