Skip to content

Conversation

@nstarman
Copy link
Contributor

This is not a good permanent solution and should be upstreamed to jaxtyping.

@nstarman nstarman changed the title TST: LiteralArray as part of ArrayLike TST: ArrayLike |= LiteralArray Sep 19, 2025
@nstarman
Copy link
Contributor Author

LiteralArray(0) appears to supplant quax.Zero and needs to be sorted. I haven't looked into this too deeply.

@johannahaffner
Copy link

In Equinox, it did not evaluate to True in our is_array checks. The relevant changes are in patrick-kidger/equinox#1099, in the _filters module, hope this helps!

@nstarman
Copy link
Contributor Author

@johannahaffner Is this directly related or more tangentially to including LiteralArray in ArrayLike? Quax, through beartype, relies on the type signature.

@johannahaffner
Copy link

LiteralArray (or the renamed TypedNdArray) duck type as Numpy arrays but breaks instance checks against np.ndarray. I think those are common in type checking.

I'm not sure if it is included in ArrayLike, but it seems likely.

@nstarman
Copy link
Contributor Author

I'm not sure if it is included in ArrayLike, but it seems likely.

It isn't in v0.7.2, which is the cause of this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants