Skip to content

Use faster group_idx creation when axis == -1 #77

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 1 commit into from
Mar 27, 2023

Conversation

dcherian
Copy link
Collaborator

@dcherian dcherian commented Mar 27, 2023

xref xarray-contrib/flox#222
xref #46
xref #51
xref #60

Uses the faster algorithm from #46 only when axis == -1 I couldn't make it work in general.

@ml31415
Copy link
Owner

ml31415 commented Mar 27, 2023

Would be good, if we could cover that with some quick tests.

@dcherian
Copy link
Collaborator Author

It is covered by existing tests for scalar axis

@pytest.mark.parametrize("axis", (0, 1))
@pytest.mark.parametrize("size", ((12,), (12, 5)))
@pytest.mark.parametrize("func", func_list)
def test_along_axis(aggregate_all, func, size, axis):

The following is a regression test for #60

def test_not_last_axis_reduction(aggregate_all):

@ml31415 ml31415 merged commit 6b7877b into ml31415:master Mar 27, 2023
@dcherian dcherian deleted the faster-validation-axis--1 branch March 27, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants