-
Notifications
You must be signed in to change notification settings - Fork 2
Test contract with BlockArrays
and BlockedArray
#34
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
=======================================
Coverage 93.95% 93.95%
=======================================
Files 15 15
Lines 364 364
=======================================
Hits 342 342
Misses 22 22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
TBD: output type of full contraction (vector-vector). I believe all the other ones are legitimate and should pass at some point. |
I would think the output type should be consistent with other contractions between those types of arrays. |
The question is what should be the output of v = BlockedArray(ones(4,), [2,2])
contract((), v, (1,), v, (1,)) isa Array{Float64, 0} # currently true
contract((), v, (1,), v, (1,)) isa BlockedArray # currently false Currently it is a There are several possibilities for the output:
The tests introduced in this PR expect the last option and are labelled as broken as the current type is not |
I see, I would expect it to output the same type as non-full contraction (your third option). |
I might be a little late to the party here, but an argument in favor of the third option: if you have a contraction of a network which is the outer product of a full contraction and a different tensor, you would want that to conserve the type, which is easier if you retain |
This PR adds extensive test for
contract
withBlockArray
andBlockedArray
as well as non-symmetricBlockSparseArray
. There are several errors that need to be fixed.