Skip to content

BF: endian fixes for streamlines code #473

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 1 commit into from
Aug 8, 2016

Conversation

matthew-brett
Copy link
Member

Getting errors reading and writing on big-endian machines.

Closes #471

@coveralls
Copy link

coveralls commented Aug 6, 2016

Coverage Status

Coverage increased (+0.0002%) to 96.217% when pulling 67efe15 on matthew-brett:endian-fix-streamlines into a4724b7 on nipy:master.

@matthew-brett matthew-brett force-pushed the endian-fix-streamlines branch from 67efe15 to aae6dee Compare August 6, 2016 17:37
@codecov-io
Copy link

codecov-io commented Aug 6, 2016

Current coverage is 94.23% (diff: 100%)

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

@@             master       #473   diff @@
==========================================
  Files           160        160          
  Lines         21197      21198     +1   
  Methods           0          0          
  Messages          0          0          
  Branches       2266       2266          
==========================================
+ Hits          19975      19976     +1   
  Misses          802        802          
  Partials        420        420          

Powered by Codecov. Last update a4724b7...7a6a71e

@coveralls
Copy link

coveralls commented Aug 6, 2016

Coverage Status

Coverage increased (+0.0002%) to 96.217% when pulling aae6dee on matthew-brett:endian-fix-streamlines into a4724b7 on nipy:master.

@matthew-brett matthew-brett force-pushed the endian-fix-streamlines branch from aae6dee to 7a6a71e Compare August 6, 2016 19:28
@coveralls
Copy link

coveralls commented Aug 6, 2016

Coverage Status

Coverage increased (+0.0002%) to 96.217% when pulling 7a6a71e on matthew-brett:endian-fix-streamlines into a4724b7 on nipy:master.

@MarcCote
Copy link
Contributor

MarcCote commented Aug 8, 2016

Oh, right. I've never really been able to test the writing on a big-endian system. Thanks for fixing it.

So, the only thing you changed is to force the header to always be written in little-endian (which make sense since we always save the points/scalars/properties in little-endian)? The others changes are simply refactoring the code?

If so, this LGTM.

@matthew-brett
Copy link
Member Author

The refactoring is because np.concatenate does not preserve the endianness of the input data types, so I had to recast the data to have the little-endian datatype before writing. So, then it was not necessary to do this casting on the inputs to the concatenate.

@MarcCote
Copy link
Contributor

MarcCote commented Aug 8, 2016

Gotcha. 👍

@matthew-brett matthew-brett merged commit 25c98ff into nipy:master Aug 8, 2016
@matthew-brett matthew-brett deleted the endian-fix-streamlines branch August 8, 2016 18:50
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