Skip to content

Conversation

mattjj
Copy link
Collaborator

@mattjj mattjj commented Oct 8, 2025

An alternative is isinstance(jax.typeof(ref), jax.ref.AbstractRef), but that requires that ref be a jax type (or else a TypeError is raised) and is more verbose. Allowing this isinstance check matches what we do for Arrays.

An alternative is `isinstance(jax.typeof(ref), jax.ref.AbstractRef)`, but that
requires that `ref` be a jax type (or else a TypeError is raised) and is more
verbose. Allowing this isinstance check matches what we do for Arrays.
@mattjj mattjj requested a review from dougalm October 8, 2025 04:57
@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Oct 8, 2025
@copybara-service copybara-service bot merged commit f5da96b into jax-ml:main Oct 8, 2025
23 checks passed
@mattjj mattjj deleted the isinstance-ref branch October 8, 2025 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kokoro:force-run pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants