Add arbitrary amount of axis #277
|
Hi, I am wondering if there is a way of adding an arbitrary amount of axis to an array import jax.numpy as jnp
X = jnp.arange(10)
Z = jnp.arange(10*3*4).reshape(10,3,4)
X.reshape([-1] + [1]*(Z.ndim-1))Thank you for any suggestions |
Answered by
arogozhnikov
Sep 3, 2023
Replies: 1 comment 3 replies
|
Hi Paul, einops does not provide such tool, you can use some trick like: result = (X.T + Z.T).T |
3 replies
Answer selected by
pablo2909
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Paul, einops does not provide such tool, you can use some trick like: