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
Round coords life #818
Round coords life #818
Conversation
See dipy#810. Also some PEP8 fixes.
Combination of PEP8 and fix is hard to follow. |
unique_idx = unique_rows(all_coords.astype(int)) | ||
else: | ||
unique_idx = unique_idx | ||
unique_idx = unique_rows(np.round(all_coords).astype(np.intp)) |
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.
How about leaving the cast to the later line, to avoid users getting errors from passed unique_idx
of wrong data type. As in:
unique_idx = unique_rows(np.round(all_coords))
return _voxel2streamline(transformed_streamline, unique_idx.astype(np.intp))
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.
Also - need test for modified behavior - such as transformed_streamline
with non-integer indices.
Sorry about interleaving functional changes together with PEP8 -- the only change (so far) that isn't PEP8 (i.e. white-space) is the rounding and casting to intp. We just otherwise never get to these things.... |
Also, fix up rounding in other places: in setting up the model, and in vox2track. Had to also reduce the match to the matlab version, but I am not sure how close we want to stay to that, as we fix up things. At the very least, the model RMSE is lower here than in the Dipy version, so the model is a more accurate fit to the signal, for the same number of parameters.
Added testing, and more calls to I had to also reduce the match to the matlab version, but I am not sure how close we want to stay to that, as we fix up things (The matlab version uses At the very least, the model RMSE is lower here than in the Matlab version, so the model is a more accurate fit to the signal, for the same number of parameters. I want to make more changes to LiFE to deal with the memory requirement. I will make a branch off of this work and a separate PR, once we resolve things here. |
Sorry to be dumb - but are the tests such that, if you change the |
Yes - I made sure of that on my laptop, but there's also an explanation: On Thu, Dec 24, 2015 at 3:20 PM, Matthew Brett notifications@github.com
|
OK - thanks for the explanation - good to go from my PoV. |
👍 |
Should fix #810