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

Function test_dlpack_legacy_capsule

python/pyarrow/tests/test_dlpack.py:255–258  ·  view source on GitHub ↗
(obj, max_version)

Source from the content-addressed store, hash-verified

253@pytest.mark.parametrize('obj', dlpack_objects())
254@pytest.mark.parametrize('max_version', [None, (0, 8)])
255def test_dlpack_legacy_capsule(obj, max_version):
256 with pytest.warns(DeprecationWarning, match="unversioned DLPack capsule"):
257 capsule = obj.__dlpack__(max_version=max_version)
258 assert PyCapsule_IsValid(capsule, b"dltensor") is True
259
260
261def immutable_tensor():

Callers

nothing calls this directly

Calls 2

PyCapsule_IsValidFunction · 0.70
__dlpack__Method · 0.45

Tested by

no test coverage detected