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

Add fancy indexing support for DOK item assignment #435

Merged
merged 8 commits into from Mar 4, 2021

Conversation

DragaDoncila
Copy link
Contributor

Modify __setitem__ to support a subset of advanced/fancy indexing where all dimensions are indexed. This uses @stschroe's gist here.

We also need __getitem__, but we thought we'd submit that as a separate PR.

@codecov
Copy link

codecov bot commented Mar 3, 2021

Codecov Report

Merging #435 (8a71345) into master (440809f) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #435      +/-   ##
==========================================
+ Coverage   95.37%   95.46%   +0.09%     
==========================================
  Files          19       20       +1     
  Lines        2809     2846      +37     
==========================================
+ Hits         2679     2717      +38     
+ Misses        130      129       -1     

@hameerabbasi
Copy link
Collaborator

It would be nice to get the code coverage up -- Look into pytest.raises (there are uses in the tests) and try to hit everything and possibly remove dead code.

@DragaDoncila
Copy link
Contributor Author

Hi @hameerabbasi I've added a few more tests and it looks like it's hitting 100% of the diff. Please let me know if there's anything else you'd like to see!

sparse/_dok.py Outdated Show resolved Hide resolved
@hameerabbasi
Copy link
Collaborator

This should be the last change needed -- Sorry for the slow feedback loop.

Co-authored-by: Hameer Abbasi <einstein.edison@gmail.com>
@DragaDoncila
Copy link
Contributor Author

Not slow at all! Thank you for the prompt reviews 😃

@hameerabbasi hameerabbasi merged commit 9bcfc7c into pydata:master Mar 4, 2021
@hameerabbasi
Copy link
Collaborator

Thanks @DragaDoncila! This is in!

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

Successfully merging this pull request may close these issues.

None yet

2 participants