This Collection specialization of nested_type is failing for jax._src.ArrayImpl, which raises a TypeError when len is called on scalar arrays: https://github.com/BasisResearch/effectful/blame/72bb624ff1dbdad16d333057a30255ee32d66de3/effectful/internals/unification.py#L1080.
The TypeError is raised here: https://github.com/jax-ml/jax/blob/4150dab417b891765466ad2f5a4e427b152768b7/jax/_src/array.py#L288. numpy.ndarray has the same behavior, so it's not necessarily a bug in jax.
I'm encountering this in RoboTL when compiling the leap hand, with jax 0.10 but not with 0.9. Regardless, seems like effectful needs to prevent or handle the TypeError there.
This
Collectionspecialization ofnested_typeis failing forjax._src.ArrayImpl, which raises aTypeErrorwhenlenis called on scalar arrays: https://github.com/BasisResearch/effectful/blame/72bb624ff1dbdad16d333057a30255ee32d66de3/effectful/internals/unification.py#L1080.The
TypeErroris raised here: https://github.com/jax-ml/jax/blob/4150dab417b891765466ad2f5a4e427b152768b7/jax/_src/array.py#L288.numpy.ndarrayhas the same behavior, so it's not necessarily a bug in jax.I'm encountering this in RoboTL when compiling the leap hand, with jax 0.10 but not with 0.9. Regardless, seems like effectful needs to prevent or handle the
TypeErrorthere.