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 warning on too dense. #213

Merged
merged 3 commits into from Dec 5, 2018
Merged

Conversation

@hameerabbasi
Copy link
Collaborator

@hameerabbasi hameerabbasi commented Dec 5, 2018

No description provided.

@codecov
Copy link

@codecov codecov bot commented Dec 5, 2018

Codecov Report

Merging #213 into master will decrease coverage by 0.25%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
- Coverage   97.67%   97.41%   -0.26%     
==========================================
  Files          11       11              
  Lines        1505     1510       +5     
==========================================
+ Hits         1470     1471       +1     
- Misses         35       39       +4
Impacted Files Coverage Δ
sparse/coo/core.py 97.21% <100%> (+0.03%) ⬆️
sparse/utils.py 100% <100%> (ø) ⬆️
sparse/sparse_array.py 96.77% <100%> (ø) ⬆️
sparse/slicing.py 99.2% <100%> (ø) ⬆️
sparse/coo/common.py 97.95% <100%> (ø) ⬆️
sparse/compatibility.py 50% <0%> (-33.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e653b1...7a82966. Read the comment docs.

@codecov
Copy link

@codecov codecov bot commented Dec 5, 2018

Codecov Report

Merging #213 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   97.67%   97.68%   +<.01%     
==========================================
  Files          11       11              
  Lines        1505     1510       +5     
==========================================
+ Hits         1470     1475       +5     
  Misses         35       35
Impacted Files Coverage Δ
sparse/coo/core.py 97.21% <100%> (+0.03%) ⬆️
sparse/coo/common.py 97.95% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e653b1...7a82966. Read the comment docs.

@hameerabbasi hameerabbasi merged commit 325d11d into pydata:master Dec 5, 2018
5 checks passed
5 checks passed
LGTM analysis: Python No alert changes
Details
ci/circleci Your tests passed on CircleCI!
Details
@codecov
codecov/patch 100% of diff hit (target 97.67%)
Details
@codecov
codecov/project 97.68% (+<.01%) compared to 1e653b1
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hameerabbasi hameerabbasi deleted the hameerabbasi:too-dense-warning branch Dec 5, 2018
@hameerabbasi hameerabbasi changed the title Add warning on too dense and fix collections.abc warnings. Add warning on too dense. Dec 5, 2018
@@ -234,6 +236,12 @@ def __init__(self, coords, data=None, shape=None, has_duplicates=True,
self.coords.shape[0],
self.coords.shape))

from .. import _AUTO_WARN_ON_TOO_DENSE
if _AUTO_WARN_ON_TOO_DENSE and self.nbytes >= self.size * self.data.itemsize:

This comment has been minimized.

@asmeurer

asmeurer Dec 5, 2018
Member

What ratio does this correspond to for float arrays?

This comment has been minimized.

@hameerabbasi

hameerabbasi Dec 5, 2018
Author Collaborator

Depends on the number of dimensions. The overall formula for COO.nbytes is data.nbytes + coords.nbytes where data.nbytes = self.nnz * data.itemsize and coords.nbytes = self.nnz * self.ndim * 8.

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

Successfully merging this pull request may close these issues.

None yet

2 participants