Skip to content

FIX: Correctly cast nan when testing array_to_file- fixes ARM64 builds #862

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 4 commits into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# can't be any leading "-"s - All newlines will be removed, so use ";"s

os: linux
arch: amd64
dist: xenial
language: python
cache: pip
Expand All @@ -16,16 +17,21 @@ env:
- INSTALL_TYPE="setup"
- CHECK_TYPE="test"
- EXTRA_WHEELS="https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com"
- PRE_WHEELS="https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
- NIGHTLY_WHEELS="https://pypi.anaconda.org/scipy-wheels-nightly/simple"
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
- PRE_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --find-links $PRE_WHEELS"
- PRE_PIP_FLAGS="--pre $EXTRA_PIP_FLAGS --extra-index-url $NIGHTLY_WHEELS"

python:
- 3.7
- 3.8

jobs:
include:
- arch: arm64
python: 3.6
env:
- DEPENDS="numpy"
- EXTRA_PIP_FLAGS="$PRE_PIP_FLAGS"
# Basic dependencies only
- python: 3.6
env:
Expand Down
2 changes: 1 addition & 1 deletion nibabel/tests/test_volumeutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ def test_a2f_nan2zero_range():
with pytest.raises(ValueError):
write_return(arr_no_nan, fobj, np.int8, intercept=129)
# OK with nan2zero false, but we get whatever nan casts to
nan_cast = np.array(np.nan).astype(np.int8)
nan_cast = np.array(np.nan, dtype=dt).astype(np.int8)
back_arr = write_return(arr, fobj, np.int8, intercept=129, nan2zero=False)
assert_array_equal([-128, -128, -128, nan_cast], back_arr)
# divslope
Expand Down