diff --git a/src/transformnd/base.py b/src/transformnd/base.py index 666770b..e993d97 100644 --- a/src/transformnd/base.py +++ b/src/transformnd/base.py @@ -105,18 +105,18 @@ def apply(self, coords: ArrayT) -> ArrayT: """ pass - def invert(self) -> Transform | None: + def invert(self) -> Transform[ArrayT] | None: """Invert the transformation, returning `None` if not possible.""" return None - def __invert__(self) -> Transform: + def __invert__(self) -> Transform[ArrayT]: """Invert transformation if possible. Returns `NotImplemented` otherwise (will raise `NotImplementedError`). Returns ------- - Transform + Transform[ArrayT] Inverted transformation. """ t = self.invert()