Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
fzimmermann89 authored Nov 25, 2024
1 parent 9b84d18 commit 5cd0241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mrpro/operators/Jacobian.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Jacobian."""

from collections.abc import Callable
from typing import Unpack

import torch
from typing_extensions import Unpack

from mrpro.operators.LinearOperator import LinearOperator
from mrpro.operators.Operator import Operator
Expand Down Expand Up @@ -46,7 +46,7 @@ def adjoint(self, *x: torch.Tensor) -> tuple[torch.Tensor, ...]: # type:ignore[
if self._vjp is None:
self._f_x0, self._vjp = torch.func.vjp(self._operator, *self._x0)
assert self._vjp is not None # noqa: S101 (hint for mypy)
return (self._vjp(x)[0],)
return (self._vjp(*x)[0],)

def forward(self, *x: torch.Tensor) -> tuple[torch.Tensor, ...]: # type:ignore[override]
"""Apply the operator.
Expand Down

0 comments on commit 5cd0241

Please sign in to comment.