Skip to content
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

fix TRZ file reader on big-endian architectures #1425

Closed
wants to merge 12 commits into from
Closed

fix TRZ file reader on big-endian architectures #1425

wants to merge 12 commits into from

Conversation

rathann
Copy link
Contributor

@rathann rathann commented Jun 22, 2017

Fixes #1424 .

Changes made in this Pull Request:

  • all ints and floats should be read as little-endian from TRZ files

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

rathann and others added 12 commits June 9, 2017 11:45
This fixes ERRORs and FAILs in the testsuite on 32bit:

TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'

and

assert_(out[0].dtype == np.int64)
  File "/usr/lib/python2.7/site-packages/numpy/testing/utils.py", line 92, in assert_
    raise AssertionError(smsg)
AssertionError
Removed TestCase usage
- Added tests for 32 bit index support
- added @rathann to AUTHORS
Groups (AtomGroup, ResidueGroup, SegmentGroup) cannot be stored in sets
or used as dict key if they are not hashable. In python 3, the __hash__
method is not defined implicitly anymore when a class has a __eq__ method.

Fixes #1397
Numpy dtype int (iN) and float (fN) specifiers assume native-endian
by default, so force them to be little-endian.

Closes #1424.
@kain88-de
Copy link
Member

@rathann your git history seems to be a bit confused. Do you mind cleanint it up. It seems to be that you only want to add the last commit. I recommend to use feature branches in your own repository to keep these things from happening.

@rathann
Copy link
Contributor Author

rathann commented Jun 22, 2017

@kain88-de Yes, sorry. I'll try, though I'm not quite sure how to do it. Feel free to reject this PR and just cherry-pick the last commit.

@kain88-de
Copy link
Member

@rathann can you please include a CHANGELOG entry and a comment in the docs that MDAnalysis expects little endian trz files.

@orbeckst
Copy link
Member

Yes, sorry. I'll try, though I'm not quite sure how to do it. Feel free to reject this PR and just cherry-pick the last commit.

In general:

git checkout develop
git pull
git checkout -b fix-trz-endian   # create feature branch
# hack and add on your branch
# ...
git add package/MDAnalysis/coordinates/TRZ.py
git commit ...
git push -u origin fix-trz-endian 

and then do the PR. Typically, don't merge develop into your branch if you can avoid it because we often use squash and that does not always works well with merges.

@orbeckst orbeckst mentioned this pull request Jun 22, 2017
4 tasks
@orbeckst
Copy link
Member

I am replacing this PR with #1427.

@orbeckst orbeckst closed this Jun 22, 2017
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.

5 participants