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

Function test_cast_duration_to_int

python/pyarrow/tests/test_array.py:2317–2323  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2315
2316@pytest.mark.numpy
2317def test_cast_duration_to_int():
2318 arr = pa.array(np.array([0, 1, 2], dtype='int64'),
2319 type=pa.duration('us'))
2320 expected = pa.array([0, 1, 2], type='i8')
2321
2322 result = arr.cast('i8')
2323 assert result.equals(expected)
2324
2325
2326@pytest.mark.numpy

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.80
arrayMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected