Replies: 1 comment 1 reply
-
Hmm good catch. I think the correct type hint should be: def _matmul(
self: Float[LinearOperator, "*batch M N"],
rhs: Union[Float[LinearOperator, "*batch2 M C"], Float[torch.Tensor, "*batch2 N C"], Float[torch.Tensor, "N"]],
) -> Union[Float[LinearOperator, "... N P"], Float[torch.Tensor, "... M C"], Float[torch.Tensor, "M"]]: and analogously for I'll fix this in a PR. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
These are the type hints on these two methods:
As you can see, there are two inconsistencies:
_matmul()
accepts both tensors with and without a trailing dimension, while_t_matmul()
does not._t_matmul()
accepts both a Tensor or a linear operator, while_matmul()
does not.Where are these inconsistencies coming from?
Beta Was this translation helpful? Give feedback.
All reactions