Skip to content

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

Merged
merged 2 commits into from
Jan 12, 2017
Merged

Conversation

matthew-brett
Copy link
Member

Orientations calculation did not take into account what would happen
with not-square matrices, 500 fixes this. These are some tests for
fixed behavior.

Orientations calculation did not take into account what would happen
with not-square matrices, 500 fixes this.  These are some tests for
fixed behavior.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 95.994% when pulling 03372c3 on matthew-brett:test-500 into 6104bd1 on nipy:master.

@codecov-io
Copy link

codecov-io commented Jan 7, 2017

Current coverage is 94.02% (diff: 100%)

Merging #502 into master will increase coverage by <.01%

@@             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          

Powered by Codecov. Last update 6104bd1...c20841b

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
Copy link
Member

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]?

Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 95.994% when pulling c20841b on matthew-brett:test-500 into 6104bd1 on nipy:master.

@matthew-brett matthew-brett merged commit 1d27aef into nipy:master Jan 12, 2017
@matthew-brett matthew-brett deleted the test-500 branch January 12, 2017 21:42
@matthew-brett
Copy link
Member Author

Thanks for the review.

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

Successfully merging this pull request may close these issues.

4 participants