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

[DOCS] .reset() doesn't clear growing axis #567

Closed
andrzejnovak opened this issue May 1, 2021 · 8 comments · Fixed by #783
Closed

[DOCS] .reset() doesn't clear growing axis #567

andrzejnovak opened this issue May 1, 2021 · 8 comments · Fixed by #783
Labels
docs Documentation

Comments

@andrzejnovak
Copy link
Member

Unsure if intended behaviour

@henryiii
Copy link
Member

henryiii commented May 1, 2021

.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. :)

@henryiii henryiii changed the title [BUG] .reset() doesn't clear StrCat axis [BUG] .reset() doesn't clear StrCategory axis May 1, 2021
@henryiii henryiii transferred this issue from scikit-hep/hist May 1, 2021
@andrzejnovak
Copy link
Member Author

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

@henryiii
Copy link
Member

This is clearly documented as "set counters to 0", so I think it's safe to close?

@henryiii
Copy link
Member

(The name comes from Boost.Histogram, otherwise I'd suggest renaming it to .clear())

@andrzejnovak
Copy link
Member Author

Sorry, could you point to where it's documented? I couldn't find it with a cursory search.

@henryiii
Copy link
Member

Can this be closed or is there an action that should still be taken?

@henryiii henryiii changed the title [BUG] .reset() doesn't clear StrCategory axis [DOCS] .reset() doesn't clear StrCategory axis Sep 15, 2021
@henryiii henryiii changed the title [DOCS] .reset() doesn't clear StrCategory axis [DOCS] .reset() doesn't clear growing axis Sep 15, 2021
@henryiii henryiii added the docs Documentation label Apr 15, 2022
@HDembinski
Copy link
Member

I don't think that .clear would be any more obvious than .reset. Important is the documentation, not the name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants