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

Enforce little endian when reading Numpy test data file #336

Merged
merged 1 commit into from Jul 24, 2022

Conversation

olebole
Copy link
Contributor

@olebole olebole commented Jul 24, 2022

Numpy data (written with ndarray.tofile() are usually system dependent; at least they depend on the byte order. This makes the test_countrate_neg_leak() fail on big endian platforms (IBM zSystems/s390x). This patch enforces little endian on all platforms with np.fromfile() so the test passes there as well. With this patch, the package passes on s390x.

@pllim pllim added this to the 1.2.0 milestone Jul 24, 2022
@codecov
Copy link

codecov bot commented Jul 24, 2022

Codecov Report

Merging #336 (71430d2) into master (2a382d7) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #336   +/-   ##
=======================================
  Coverage   94.46%   94.46%           
=======================================
  Files          17       17           
  Lines        2096     2096           
=======================================
  Hits         1980     1980           
  Misses        116      116           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a382d7...71430d2. Read the comment docs.

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM but I'll let the CI run. Even though this look good, I might not come back to this in a few days.

Do you think it is beneficial to add a s390x job like astropy here or is that overkill?

@pllim pllim merged commit 3a80de6 into spacetelescope:master Jul 24, 2022
@pllim pllim added the bug label Jul 24, 2022
@pllim
Copy link
Contributor

pllim commented Jul 24, 2022

p.s. Also let me know if you need a new release. Thanks!

@olebole olebole deleted the arch-independent-test branch July 26, 2022 12:42
@olebole
Copy link
Contributor Author

olebole commented Jul 26, 2022

I think that S390s is quite exotic, and the bugs that appear there might be taken as minor. Probably it is enough when they are fixed only after I found them by having a new Debian package; a Ci test is IMO not required. I applied this as a patch to the Debian package, which is fine for me. A new version is not needed.

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

Successfully merging this pull request may close these issues.

None yet

2 participants