Uh oh!
There was an error while loading. Please reload this page.
clib.conversion._to_numpy: Add tests for pandas.Series with pyarrow date32/date64 types - #3610
Conversation
e13b5d3 to
d504a04Compare…rrow]' to 'datetime64[ms]'
d504a04 to
af30386Compareseisman
commented
Nov 14, 2024
Ping @weiji14 for final reviews on the |
Maybe update the test here too to check explicitly for "datetime64[D]"/"datetim64[ms]" instead of just pygmt/pygmt/tests/test_clib_vectors_to_arrays.py Lines 89 to 100 in 9a12ae9 |
seisman
commented
Nov 14, 2024
Actually I feel the test |
weiji14
left a comment
There was a problem hiding this comment.
Actually I feel the test
test_vectors_to_arrays_pyarrow_datetimecan be removed, since it's already covered by the newly added tests in this PR.
On second thought, maybe keep the test. we need to test that vectors_to_arrays can handle mixed dtypes (and that test checks both date32/date64) from a pandas.DataFrame or nested list, whereas _to_numpy is for single dtypes on a pandas.Series or single list.
Description of proposed changes
Add tests for panda.Series with pyarrow date32/date64 dtypes.
In PR #2845, we added the support of
date32[day][pyarrow]anddate64[ms][pyarrow]and mapped them tonp.datetime64. This PR improves it and maps them to"datetime64[D]"anddatetim64[ms]respectively.After approval, I plan to cherry-pick changes in e13b5d3 into a separate PR so that we can have a changelog entry.