boost-histogram
boost-histogram copied to clipboard
[DOCS] .reset() doesn't clear growing axis
Unsure if intended behaviour
.reset()
empties all the bins. It doesn't remove items from a growing axis (guessing that's what you mean?). Rather wishing we called it .clear()
now. :)
I see, so it is intended. I was trying to make a copy of a histogram (while trying to make a sum on categorical axes) to assign new bins.
I suppose it's unusual and if some groupby gets implemented unnecessary, but I'm not sure, if it's a completely illegitimate use
This is clearly documented as "set counters to 0", so I think it's safe to close?
(The name comes from Boost.Histogram, otherwise I'd suggest renaming it to .clear()
)
Sorry, could you point to where it's documented? I couldn't find it with a cursory search.
https://github.com/scikit-hep/boost-histogram#cheatsheet and https://boost-histogram.readthedocs.io/en/latest/usage/histogram.html#operations
Can this be closed or is there an action that should still be taken?
I don't think that .clear
would be any more obvious than .reset
. Important is the documentation, not the name.