-
Notifications
You must be signed in to change notification settings - Fork 262
TST: add test for fix in PR 500 #502
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
Orientations calculation did not take into account what would happen with not-square matrices, 500 fixes this. These are some tests for fixed behavior.
Current coverage is 94.02% (diff: 100%)@@ master #502 diff @@
==========================================
Files 166 166
Lines 21832 21843 +11
Methods 0 0
Messages 0 0
Branches 2325 2325
==========================================
+ Hits 20527 20538 +11
Misses 875 875
Partials 430 430
|
mat, vec = to_matvec(def_aff) | ||
aff_extra_col = np.zeros((4, 5)) | ||
aff_extra_col[:3, :3] = mat | ||
aff_extra_col[:3, -1] = vec |
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.
Is that supposed to be -1 with 5 columns? Or aff_extra_col[:3, 3]
?
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.
(Assuming I understand what's going on...)
For clarity, maybe an easier way to do this would be to have:
base_affine = np.zeros((4,4))
base_affine [:3, :3] = mat
base_affine[:3, -1] = vec
aff_extra_col[:4, :4] = base_affine
aff_extra_row[:4, :4] = base_affine
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.
In both cases I was aiming for a 4th column / row with all zero, with the last column always being the translations, and non-zero. Is that what you thought?
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.
Ah, no, I misunderstood. Carry on, then.
Doesn't make any difference to calculations, but for the sake of a formally correct affine.
Thanks for the review. |
Orientations calculation did not take into account what would happen
with not-square matrices, 500 fixes this. These are some tests for
fixed behavior.