Open martenlienen opened 2 days ago
Yup, this is a known issue. I don't have a nice way to fix this right now -- this is quite a complicated corner of jaxtyping! -- but I'd be happy to take a PR if someone feels like taking this on.
If need be you can maybe do something like str(self.shape).replace(",", " ")[1:-1]
but that's obviously pretty messy.
Would it be possible to make the following code snippet work?
At the moment it does not work as far as I can tell, because
{self.shape}
is only matched against a single dimension ofx
. Is there a way to evaluate the expression and splice in the tuple value into the type before the type gets matched against the dimensions? Maybe with something like a*{self.shape}
syntax?