Skip to content

Commit

Permalink
Merge pull request #862 from effigies/test/new_archs
Browse files Browse the repository at this point in the history
FIX: Correctly cast ``nan`` when testing ``array_to_file``- fixes ARM64 builds
  • Loading branch information
effigies authored May 27, 2020
2 parents 97d5d03 + 68579bf commit 23de925
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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

0 comments on commit 23de925

Please sign in to comment.