jaxtyping icon indicating copy to clipboard operation
jaxtyping copied to clipboard

Provide a way to get error diagnostics out of isinstance checks

Open reinerp opened this issue 1 year ago • 1 comments

The assert isinstance(...) pattern prints a mostly useless message, just "AssertionError" without explanation. Would it be possible to expose an assertIsInstance(x, ty) API that prints expected versus actual, like we get for errors in the function arguments?

reinerp avatar Feb 08 '24 03:02 reinerp