-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ENH: Adds an out argument to bincount. #9424
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
Conversation
It's missing all the necessary extra tests and additional documentation, and it uses |
} | ||
|
||
lst = (PyArrayObject *)PyArray_ContiguousFromAny(list, NPY_INTP, 1, 1); | ||
if (lst == NULL) { | ||
list_arr = _array_from_object(list_obj, NPY_INTP, 0); |
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.
Why is the output type intp? That seems somewhat arbitrary, and it would seem more sensible to respect the type of the out argument
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.
Hmm... Perhaps we could mix in here some of the ideas in #7464, which I apparently abandoned for no good reason. Will give it some thought.
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.
I expect the biggest problem was what do about backcompat.
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.
For this PR, isn't it fine to keep the list integer?
Test failure looks legitimate. |
Couple of compiler warnings to deal with. |
This is still a nice idea. I'm not quite sure what got it stuck... To get around the weirdness of not initializing |
Please fix this PR as it would be a useful addition. |
Closing since it has not been touched for quite a while. This may be useful, if someone else wants to pick it up. |
Fixes #9397.