patrick-kidger / torchtyping

Type annotations and dynamic checking for a tensor's shape, dtype, names, etc.
Apache License 2.0
1.41k stars 34 forks source link

Never create a class from _TensorBase that is not a Tensor #49

Closed albanD closed 3 months ago

albanD commented 3 months ago

Fix https://github.com/patrick-kidger/torchtyping/issues/48 by remoing the mixin class and creating the final class directly. Tested locally that this imports fine with latest PyTorch

patrick-kidger commented 3 months ago

Great! I've just done a new release including this fix. Hopefully that fixes things for folks downstream. :)