-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[FIX] OWDataProjectionWidget: check validity, fix sparse data reloading #3485
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3485 +/- ##
==========================================
+ Coverage 83.55% 83.57% +0.02%
==========================================
Files 367 367
Lines 65454 65470 +16
==========================================
+ Hits 54691 54718 +27
+ Misses 10763 10752 -11 |
Codecov Report
@@ Coverage Diff @@
## master #3485 +/- ##
==========================================
+ Coverage 83.55% 83.59% +0.03%
==========================================
Files 368 368
Lines 65772 65807 +35
==========================================
+ Hits 54956 55009 +53
+ Misses 10816 10798 -18 |
2c86913
to
53dcc22
Compare
v2.sort(axis=0) | ||
return np.allclose(v1, v2, equal_nan=True) | ||
|
||
|
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.
@VesnaT, if you agree with this, I agree with the rest (which I do anyway) and one of us can merge this.
|
||
v1 = np.vstack(sp.find(a1)).T | ||
v2 = np.vstack(sp.find(a2)).T | ||
if not (sp.issparse(a1) and sp.issparse(a2)): # Any dense: order indices |
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.
So, sp.find internally sorts if the matrices have has_canonical_format=False
, which is False when converting from any sparse matrix. Therefore, sparse matrices currently do not have to be resorted, so your optimization works well. Should we rely on such undocumented behavior, @janezd?
274300b
to
e1ccd4a
Compare
e1ccd4a
to
3939d8b
Compare
Issue
Description of changes
Includes