jaxtyping
jaxtyping copied to clipboard
invalid-type-form when using ty
I'm using ty as my language server and I get the following error for Key (from jaxtyping import Key):
`typing.Annotated` requires at least two arguments when used in a type expression ty([invalid-type-form](https://ty.dev/rules#invalid-type-form))
is it necessary to annotate key with array? like Key[Array, "s1 s2"]?
Yup, it is. Key works as a dtype, just like jaxtyping.Float etc. This is essentially the way that JAX represents these internally as well.
got it. thanks.