Skip to content

BUG/compat: accum funcs changed in numpy 1.18 #29058

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jbrockmendel opened this issue Oct 17, 2019 · 2 comments · Fixed by #30460
Closed

BUG/compat: accum funcs changed in numpy 1.18 #29058

jbrockmendel opened this issue Oct 17, 2019 · 2 comments · Fixed by #30460
Labels
Bug Compat pandas objects compatability with Numpy or Python functions Numeric Operations Arithmetic, Comparison, and Logical operations
Milestone

Comments

@jbrockmendel
Copy link
Member

#29057 xfails some tests that are broken with numpy 1.18, which changes the behavior of np.minimum.accumulate on dt64/td64 arrays:

s = pd.Series(
            pd.to_datetime(["NaT", "2000-1-2", "NaT", "2000-1-1", "NaT", "2000-1-3"])
        )

>>> np.minimum.accumulate(s.values)  # numpy 1.17
array([                          'NaT', '2000-01-02T00:00:00.000000000',
       '2000-01-02T00:00:00.000000000', '2000-01-01T00:00:00.000000000',
       '2000-01-01T00:00:00.000000000', '2000-01-01T00:00:00.000000000'],
      dtype='datetime64[ns]')

>>> np.accumulate.minimum(s.values)  # numpy 1.18
array(['NaT', 'NaT', 'NaT', 'NaT', 'NaT', 'NaT'], dtype='datetime64[ns]')

This will need to be addressed in core.generic._make_cum_function (maybe other places too, not sure)

@jbrockmendel jbrockmendel added Bug Compat pandas objects compatability with Numpy or Python functions Numeric Operations Arithmetic, Comparison, and Logical operations labels Oct 23, 2019
@jbrockmendel
Copy link
Member Author

@MomIsBestFriend the cleanup PRs you're making are great, but I'd encourage you to look at more issues as you get more experienced. A few issues that you might think about working on are this #29058, #28507, #27829, #23929, #24115, #22218, #27613.

@ShaharNaveh
Copy link
Member

Thank you so much! @jbrockmendel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Compat pandas objects compatability with Numpy or Python functions Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants