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

Function test_tensor_base_object

python/pyarrow/tests/test_tensor.py:79–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78
79def test_tensor_base_object():
80 tensor = pa.Tensor.from_numpy(np.random.randn(10, 4))
81 n = sys.getrefcount(tensor)
82 array = tensor.to_numpy() # noqa
83 assert sys.getrefcount(tensor) == n + 1
84
85
86@pytest.mark.parametrize('dtype_str,arrow_type', tensor_type_pairs)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected