Skip to content

Can we inherit from jax.Tensor ? #16290

Answered by jakevdp
samsja asked this question in Q&A
Jun 7, 2023 · 5 comments · 4 replies
Discussion options

You must be logged in to vote

No, there is no way to subclass JAX arrays in such a way that they will be compatible with JAX transformations.

This may be an XY problem – if you can tell us more about your actual end-goal, we may be able to recommend a good approach that is possible within JAX's API & computational model.

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jakevdp
Comment options

You must be logged in to vote
4 replies
@jakevdp
Comment options

@samsja
Comment options

@jakevdp
Comment options

@samsja
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants