Skip to content

Commit f3434bb

Browse files
committed
FIX: Switch from deprecated get_data() method to get_fdata()
1 parent 04d41d9 commit f3434bb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nitime/fmri/io.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def time_series_from_file(nifti_files, coords=None, TR=None, normalize=None,
8888
if verbose:
8989
print("Reading %s" % nifti_files)
9090
im = load(nifti_files)
91-
data = im.get_data()
91+
data = im.get_fdata()
9292
# If coordinates are provided as input, read data only from these coordinates:
9393
if coords is not None:
9494
#If the input is the coords of several ROIs
@@ -118,7 +118,7 @@ def time_series_from_file(nifti_files, coords=None, TR=None, normalize=None,
118118
if verbose:
119119
print("Reading %s" % f)
120120
im = load(f)
121-
data = im.get_data()
121+
data = im.get_fdata()
122122
if coords is not None:
123123
#If the input is the coords of several ROIs
124124
if isinstance(coords, tuple) or isinstance(coords, list):

nitime/fmri/tests/test_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_time_series_from_file():
6565
npt.assert_equal(t4.sampling_interval,nitime.TimeArray(1.35))
6666

6767
# Test the default behavior:
68-
data = io.load(fmri_file1).get_data()
68+
data = io.load(fmri_file1).get_fdata()
6969
t5 = ts_ff(fmri_file1)
7070
npt.assert_equal(t5.shape, data.shape)
7171
npt.assert_equal(t5.sampling_interval, ts.TimeArray(1, time_unit='s'))

0 commit comments

Comments
 (0)