Skip to content

ENH: Add numba engine to rolling/expanding.std/var #44461

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

Merged
merged 26 commits into from
Nov 26, 2021

Conversation

mroeschke
Copy link
Member

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@mroeschke mroeschke added Enhancement Window rolling, ewma, expanding labels Nov 15, 2021
@mroeschke
Copy link
Member Author

Failure due to codecov not being able to tell the numba decorated function is inherently tested.

@mroeschke mroeschke added this to the 1.4 milestone Nov 22, 2021
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the arm failure real?

@@ -212,7 +212,8 @@ Other enhancements
- :meth:`.GroupBy.mean` now supports `Numba <http://numba.pydata.org/>`_ execution with the ``engine`` keyword (:issue:`43731`)
- :meth:`Timestamp.isoformat`, now handles the ``timespec`` argument from the base :class:``datetime`` class (:issue:`26131`)
- :meth:`NaT.to_numpy` ``dtype`` argument is now respected, so ``np.timedelta64`` can be returned (:issue:`44460`)
-
- :meth:`.Rolling.var`, :meth:`.Expanding.var`, :meth:`.Rolling.std`, :meth:`.Expanding.std` now support `Numba <http://numba.pydata.org/>`_ execution with the ``engine`` keyword (:issue:`44461`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at some point should group these doc-string changes together (maybe into a separate section ok too but not requried)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah once I add median I can group these better

nv.validate_window_func("std", args, kwargs)
if maybe_use_numba(engine):
if self.method == "table":
raise NotImplementedError("std not supported with method='table'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hit this in tests?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nv.validate_window_func("var", args, kwargs)
if maybe_use_numba(engine):
if self.method == "table":
raise NotImplementedError("var not supported with method='table'")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same question

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mroeschke
Copy link
Member Author

is the arm failure real?

It's this flaky test

@pytest.mark.single
    def test_unique_bad_unicode(index_or_series):
        # regression test for #34550
        uval = "\ud83d"  # smiley emoj

@jreback jreback merged commit 8b858cd into pandas-dev:master Nov 26, 2021
@jreback
Copy link
Contributor

jreback commented Nov 26, 2021

thanks @mroeschke

@mroeschke mroeschke deleted the enh/numba_var branch November 26, 2021 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants