jax
f39a8adc - Add avals to TypedNdArray and TypedInt/TypedFloat/TypedComplex.

Commit
28 days ago
Add avals to TypedNdArray and TypedInt/TypedFloat/TypedComplex. If we construct avals at the time of canonicalization, when we have gone to the trouble of thinking about the types already, we can make subsequent `typeof` calls cheaper. To avoid a circular dependency we had to add some registration patterns in a few places. In addition I also cleaned up a few isinstance tests that no longer need to name TypedNdArray explicitly given it is a subtype of np.ndarray. PiperOrigin-RevId: 886716929
Author
Parents
Loading