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

Function test_to_numpy_datetime64

python/pyarrow/tests/test_array.py:263–267  ·  view source on GitHub ↗
(unit, tz)

Source from the content-addressed store, hash-verified

261@pytest.mark.parametrize('unit', ['s', 'ms', 'us', 'ns'])
262@pytest.mark.parametrize('tz', [None, "UTC"])
263def 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

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected