(unit, tz)
| 261 | @pytest.mark.parametrize('unit', ['s', 'ms', 'us', 'ns']) |
| 262 | @pytest.mark.parametrize('tz', [None, "UTC"]) |
| 263 | def test_to_numpy_datetime64(unit, tz): |
| 264 | arr = pa.array([1, 2, 3], pa.timestamp(unit, tz=tz)) |
| 265 | expected = np.array([1, 2, 3], dtype=f"datetime64[{unit}]") |
| 266 | np_arr = arr.to_numpy() |
| 267 | np.testing.assert_array_equal(np_arr, expected) |
| 268 | |
| 269 | |
| 270 | @pytest.mark.numpy |