Skip to content

Fix min_count support for multi-dimensional reductions#11307

Open
badcount wants to merge 1 commit intopydata:mainfrom
badcount:fix/min_count-multidim-reductions
Open

Fix min_count support for multi-dimensional reductions#11307
badcount wants to merge 1 commit intopydata:mainfrom
badcount:fix/min_count-multidim-reductions

Conversation

@badcount
Copy link
Copy Markdown

This PR removes the restriction that prevented using min_count with tuple/list axes in reduction operations like sum and prod. It also fixes a pre-existing bug in NAT_TYPES comparison and adds proper handling for multiple axes.

- Remove restriction that prevented min_count with tuple/list axes
- Use np.take(mask.shape, axis).prod() for computing total elements across multiple axes
- Add _is_nat_dtype helper to fix NaT dtype comparison bug
- Update docstrings for clarity
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.

1 participant