Skip to content

Commit

Permalink
Merge pull request #209 from effigies/feat/deprecate-apply-method
Browse files Browse the repository at this point in the history
ENH: Restore apply method, warning of deprecation and calling function
  • Loading branch information
effigies authored Jun 12, 2024
2 parents a9a9fda + e98487c commit d633f07
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.
"""
message = (
"The `apply` method is deprecated. Please use `nitransforms.resampling.apply` instead."
)
warnings.warn(message, DeprecationWarning, level=2)
from .resampling import apply

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


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

0 comments on commit d633f07

Please sign in to comment.