-
Notifications
You must be signed in to change notification settings - Fork 21
add 1-arg count, sum, prod, etc. methods; with tests #243
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
tests pass. ready for review |
hmm... should probably handle the dims and init kwargs while we're at it. |
ok, so, adding only the init kwarg to count caused the tests to fail here. must be some sort of dispatch problem since that line tries to pass in a dims kwarg. and adding a dims kwarg is more than i can chew a.t.m, particularly given that one can simply use the dims and init kwargs of mapreduce instead. so i reverted the init kwarg commit, and added one-arg (hah, not 2, misspoke in the original title to this PR) methods to sum, prod, etc. just above. |
tests aren't the greatest. i tried using |
Yeah, dims keywords are HARD! We could add methods for |
can you please clarify? i don't understand. |
access counts are the same i now understand because without this PR the fallback is to the Generator. |
I mean we know order doesn't matter with these methods, so we can allocate the final array size then reduce each chunk into it in the right places. But generally we don't know that so it would be specialised. |
i figured out a way to test that the new methods do not use the generator. involves tracing the called functions, and requires two extra test dependancies. let me know what you think. |
That could be generally useful to have for other tests too. @meggart what do you think about test deps |
I have no problem to add these as test dependencies and always curious to learn, looks useful and indeed we should use this in other test contexts as well. |
as discussed