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

Provide a shorthand for "one bin along this axis" in .rebin #737

Closed
Cadair opened this issue Jun 26, 2024 · 1 comment · Fixed by #777
Closed

Provide a shorthand for "one bin along this axis" in .rebin #737

Cadair opened this issue Jun 26, 2024 · 1 comment · Fixed by #777
Milestone

Comments

@Cadair
Copy link
Member

Cadair commented Jun 26, 2024

Describe the feature

If you want to "drop" an axis by averaging along an axis then you need to know the length of that axis to do rebin((nx, 540, 20)) it would be nice to provide a shorthand for this, I propose a -1 sentinel so for a cube with dimensions (100, 100, 100) .rebin((-1, -1, 50)) would give you a cube with shape (1, 1, 2).

Proposed solution

No response

@DanRyanIrish
Copy link
Member

I support this. And it should be simple to implement. It may make sense to implement this after #726 is merged, as it moves the code where this needs to be implemented.

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