Skip to content

Commit

Permalink
ENH: Restore apply method, warning of deprecation and calling function
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed May 30, 2024
1 parent a9a9fda commit 4bd928b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions nitransforms/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,19 @@ def _to_hdf5(self, x5_root):
"""Serialize this object into the x5 file format."""
raise NotImplementedError

def apply(self, *args, **kwargs):
"""Apply the transform to a dataset.
Deprecated. Please use ``nitransforms.resampling.apply`` instead.
"""
warnings.warn(
"The `apply` method is deprecated. Please use `nitransforms.resampling.apply` instead.",
DeprecationWarning,
)
from .resampling import apply

return apply(self, *args, **kwargs)


def _as_homogeneous(xyz, dtype="float32", dim=3):
"""
Expand Down

0 comments on commit 4bd928b

Please sign in to comment.