Skip to content
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

[FEATURE]: Use fast path when grouping by unique monotonic decreasing variable #6220

Closed
dcherian opened this issue Jan 31, 2022 · 1 comment · Fixed by #7427
Closed

[FEATURE]: Use fast path when grouping by unique monotonic decreasing variable #6220

dcherian opened this issue Jan 31, 2022 · 1 comment · Fixed by #7427

Comments

@dcherian
Copy link
Contributor

Is your feature request related to a problem?

See https://github.com/pydata/xarray/pull/6213/files#r795716713

We check whether the by variable for groupby is unique and monotonically increasing. But the fast path would also apply to unique and monotonically decreasing variables.

Describe the solution you'd like

Update the condition to is_monotonic_increasing or is_monotonic_decreasing and add a test.

Describe alternatives you've considered

No response

Additional context

No response

@JoelJaeschke
Copy link
Contributor

Hi @dcherian, I took a look at this issue and would appreciate your feedback :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants