-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
len() function for COO objects #68
Conversation
Seems fine, however it would be really nice to have docstrings for these, and if possible, tests. |
Added them |
Well, this looks good. Let me know if you're finished working on it, and I'll review and merge (don't want to be too fast this time). |
This is ready to be merged. |
Agreed. |
Thanks @nils-werner ! |
One unexpected sideeffect of this:
now magically works!
|
I'm going to assume it's really slow. Do we have any benchmarks for this? |
Yes, it's very very slow. If I understand it correctly, What if we implement
Before
After
I can't explain where the 2x slowdown (11 vs 23 us) comes from though... |
A pull request would be welcome. Also, your data is too small. Maybe it's just the overhead. |
Quite trivial really, implements the
len()
operation following NumPy's convention of