-
Notifications
You must be signed in to change notification settings - Fork 17
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 bugs introduced by BlockArray changes #282
Conversation
Codecov Report
@@ Coverage Diff @@
## main #282 +/- ##
=======================================
Coverage 94.15% 94.15%
=======================================
Files 49 49
Lines 3269 3269
=======================================
Hits 3078 3078
Misses 191 191
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
3402386
to
8c2cc64
Compare
Running the examples now, I still get these issues (below).
|
a0233e2
to
5882bf9
Compare
Running the examples revealed several bugs introduced by the BlockArray changes in #259 . Specifically,
x.sum()
cannot be used to fully reduce aBlockArray
x
because as per the docs, allBlockArray
methods map over the blocks, except a few reductions insnp
.snp.sum(x)
is required instead.snp.iscomplexobj
cannot be used to used to check if aBlockArray
is complex, because it maps over blocks. In the future, we may want mixed types inBlockArray
so such a check cannot work. In the short term,snp.util.is_complex_dtype(x.dtype)
will work.This PR adds tests that would have caught these problems and fixes them.
Closes #281 .