Skip to content

Commit 1fb2b4e

Browse files
committed
MNT: Remove orientations.orientation_affine
1 parent c185da2 commit 1fb2b4e

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

nibabel/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@
5858
from .freesurfer import MGHImage
5959
from .funcs import (squeeze_image, concat_images, four_to_three,
6060
as_closest_canonical)
61-
from .orientations import (io_orientation, orientation_affine,
62-
flip_axis, OrientationError,
61+
from .orientations import (io_orientation, flip_axis, OrientationError,
6362
apply_orientation, aff2axcodes)
6463
from .imageclasses import all_image_classes
6564
from . import mriutils

nibabel/orientations.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -228,14 +228,6 @@ def inv_ornt_aff(ornt, shape):
228228
return np.dot(undo_flip, undo_reorder)
229229

230230

231-
@deprecate_with_version('orientation_affine deprecated. '
232-
'Please use inv_ornt_aff instead.',
233-
'3.0',
234-
'4.0')
235-
def orientation_affine(ornt, shape):
236-
return inv_ornt_aff(ornt, shape)
237-
238-
239231
@deprecate_with_version('flip_axis is deprecated. '
240232
'Please use numpy.flip instead.',
241233
'3.2',

nibabel/tests/test_orientations.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@
1717

1818
from ..orientations import (io_orientation, ornt_transform, inv_ornt_aff,
1919
flip_axis, apply_orientation, OrientationError,
20-
ornt2axcodes, axcodes2ornt, aff2axcodes,
21-
orientation_affine)
20+
ornt2axcodes, axcodes2ornt, aff2axcodes)
2221

2322
from ..affines import from_matvec, to_matvec
24-
from ..deprecator import ExpiredDeprecationError
2523

2624

2725
IN_ARRS = [np.eye(4),
@@ -355,11 +353,6 @@ def test_inv_ornt_aff():
355353
inv_ornt_aff([[0, 1], [1, -1], [np.nan, np.nan]], (3, 4, 5))
356354

357355

358-
def test_orientation_affine_deprecation():
359-
with pytest.raises(ExpiredDeprecationError):
360-
orientation_affine([[0, 1], [1, -1], [2, 1]], (3, 4, 5))
361-
362-
363356
def test_flip_axis_deprecation():
364357
a = np.arange(24).reshape((2, 3, 4))
365358
axis = 1

0 commit comments

Comments
 (0)