Skip to content

Linear Operator implementation and einsum #15193

Answered by mattjj
quattro asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the question!

That seems like a cool thing to build. Unfortunately JAX doesn't currently offer a good way to overload jax.numpy function application (and the NumPy's overriding mechanisms probably won't work here).

The best current solution I can think of is just to define your own NumPy wrapper API in a package, like import quattro.numpy as qnp, and then write functions calling qnp (or call it jnp or np if you prefer).

We've talked about adding a NumPy-overriding API to JAX, but it's never risen to the top of the priority list.

What do you think?

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mattjj
Comment options

@quattro
Comment options

@quattro
Comment options

@jakevdp
Comment options

@quattro
Comment options

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