()
| 2315 | |
| 2316 | @pytest.mark.numpy |
| 2317 | def 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 |