-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: support variable rebinning #913
Conversation
Ah, yeah, you probably have to use boost-histogram's cast system to go from C++ class to the correct Python class. I can look (hopefully by end of day or tomorrow, as I'll be teaching soon). |
Thanks for this very useful feature! I was wondering if this adds (or could add) support for renaming categorical axis values as well? |
I still need to review this and make it work on callables. |
elif getattr(ind.step, "group_mapping", None) is not None: | ||
groups = ind.step.group_mapping(self.axes[i]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: I didn't update this correctly.
src/boost_histogram/tag.py
Outdated
|
||
from ._internal.typing import AxisLike | ||
|
||
__all__ = ("Slicer", "Locator", "at", "loc", "overflow", "underflow", "rebin", "sum") | ||
__all__ = ("Slicer", "Locator", "at", "loc", "overflow", "underflow", "sum", "rebin") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__all__ = ("Slicer", "Locator", "at", "loc", "overflow", "underflow", "sum", "rebin") | |
__all__ = ("Slicer", "Locator", "at", "loc", "overflow", "underflow", "rebin", "sum") |
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
Signed-off-by: Henry Schreiner <[email protected]>
XRef #208
The current interface:
cc: @henryiii @matthewfeickert