Skip to content

Commit b9d3237

Browse files
committed
MNT: Remove ArraySequence.data property
1 parent 0ea90c1 commit b9d3237

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

nibabel/streamlines/array_sequence.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55

66
import numpy as np
77

8-
from ..deprecated import deprecate_with_version
9-
108
MEGABYTE = 1024 * 1024
119

1210

@@ -154,16 +152,6 @@ def total_nb_rows(self):
154152
""" Total number of rows in this array sequence. """
155153
return np.sum(self._lengths)
156154

157-
@property
158-
@deprecate_with_version("'ArraySequence.data' property is deprecated.\n"
159-
"Please use the 'ArraySequence.get_data()' method instead",
160-
'3.0', '4.0')
161-
def data(self):
162-
""" Elements in this array sequence. """
163-
view = self._data.view()
164-
view.setflags(write=False)
165-
return view
166-
167155
def get_data(self):
168156
""" Returns a *copy* of the elements in this array sequence.
169157

nibabel/streamlines/tests/test_array_sequence.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from numpy.testing import assert_array_equal
1111

1212
from ..array_sequence import ArraySequence, is_array_sequence, concatenate
13-
from ...deprecator import ExpiredDeprecationError
1413

1514

1615
SEQ_DATA = {}
@@ -95,11 +94,6 @@ def test_creating_arraysequence_from_list(self):
9594
check_arr_seq(ArraySequence(iter(SEQ_DATA['data']), buffer_size),
9695
SEQ_DATA['data'])
9796

98-
def test_deprecated_data_attribute(self):
99-
seq = ArraySequence(SEQ_DATA['data'])
100-
with pytest.raises(ExpiredDeprecationError):
101-
seq.data
102-
10397
def test_creating_arraysequence_from_generator(self):
10498
gen_1, gen_2 = itertools.tee((e for e in SEQ_DATA['data']))
10599
seq = ArraySequence(gen_1)

0 commit comments

Comments
 (0)