Skip to content
Snippets Groups Projects
Commit 16166164 authored by Paul McCarthy's avatar Paul McCarthy :mountain_bicyclist:
Browse files

Merge branch 'bf/nb5' into 'master'

BF: get_data() raises error in nibabel >=5

See merge request !32
parents b27e3f6e 41f7dccf
No related branches found
No related tags found
1 merge request!32BF: get_data() raises error in nibabel >=5
Pipeline #17476 passed
......@@ -2,8 +2,15 @@
=====================
0.11.0 (Tuesday 7th February 2023
---------------------------------
0.11.1 (Thursday 2nd March 2023)
--------------------------------
* Update uses of the deprecated `nibabel.Nifti1Image.get_data` function.
0.11.0 (Tuesday 7th February 2023)
----------------------------------
* Environment variables and tildes (``~``) can now be used in the pyfeeds
......
......@@ -5,7 +5,7 @@
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
#
__version__ = '0.11.0'
__version__ = '0.11.1'
"""The pyfeeds version number. """
......
......@@ -441,8 +441,8 @@ def evalImage(pyf, testfile, benchmark):
img1 = pyf.imageCache[testfile]
img2 = pyf.imageCache[benchmark]
data1 = img1.get_data()
data2 = img2.get_data()
data1 = img1.get_fdata()
data2 = img2.get_fdata()
return cmpArrays(data1, data2)
......@@ -483,8 +483,8 @@ def evalVectorImage(pyf, testfile, benchmark):
img1 = pyf.imageCache[testfile]
img2 = pyf.imageCache[benchmark]
data1 = img1.get_data().reshape(-1, 3).T
data2 = img2.get_data().reshape(-1, 3).T
data1 = img1.get_fdata().reshape(-1, 3).T
data2 = img2.get_fdata().reshape(-1, 3).T
# Calculate the length of each vector,
# discard vectors of length 0, and
......@@ -567,10 +567,10 @@ def evalPolarCoordinateImageGroup(pyf, testfiles, benchmarks):
raise ValueError('Wrong number of files: {} <-> {}'
''.format(testfiles, benchmarks))
testtheta = pyf.imageCache[testtheta[ 0]].get_data()
testphi = pyf.imageCache[testphi[ 0]].get_data()
benchtheta = pyf.imageCache[benchtheta[0]].get_data()
benchphi = pyf.imageCache[benchphi[ 0]].get_data()
testtheta = pyf.imageCache[testtheta[ 0]].get_fdata()
testphi = pyf.imageCache[testphi[ 0]].get_fdata()
benchtheta = pyf.imageCache[benchtheta[0]].get_fdata()
benchphi = pyf.imageCache[benchphi[ 0]].get_fdata()
if any((testphi .shape != testtheta.shape,
benchtheta.shape != testtheta.shape,
......
......@@ -143,14 +143,14 @@ def loadHashes(hashFile):
Hash files may be in one of two formats:
- Format 2: A three-column text file where each row contains information
about one test, with each column containing:
- The test name
- a hash calculated on the contents of the test directory, and
- a hash calculated on the test input data
about one test, with columns corresponding to:
- Test names
- Hashes calculated on the contents of the test directories, and
- Hashes calculated on the test input data
This format is produced by pyfeeds versions 0.11 and newer.
- Format 1: A two-column text file where each row contains hashes for
one test, with each column containing:
one test, with columns corresponding to:
- a hash calculated on the contents of the test directory, and
- a hash calculated on the test input data
This format was produced by pyfeeds versions 0.10 and older.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment