jorisvandenbossche commented on PR #35656:
URL: https://github.com/apache/arrow/pull/35656#issuecomment-1583106826

   For the tz aware update, that also influences the (currently untested) 
to_numpy behaviour, which you can test with the following change:
   
   ```diff
   --- a/python/pyarrow/tests/test_array.py
   +++ b/python/pyarrow/tests/test_array.py
   @@ -211,9 +211,10 @@ def test_to_numpy_writable():
            arr.to_numpy(zero_copy_only=True, writable=True)
    
    
   [email protected]('tz', [None, "UTC"])
    @pytest.mark.parametrize('unit', ['s', 'ms', 'us', 'ns'])
   -def test_to_numpy_datetime64(unit):
   -    arr = pa.array([1, 2, 3], pa.timestamp(unit))
   +def test_to_numpy_datetime64(unit, tz):
   +    arr = pa.array([1, 2, 3], pa.timestamp(unit, tz=tz))
        expected = np.array([1, 2, 3], dtype="datetime64[{}]".format(unit))
        np_arr = arr.to_numpy()
        np.testing.assert_array_equal(np_arr, expected)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to