8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brought up by this comment, it turns out that einsum actually is another name for moveaxis, and is 10 times faster
einsum
a = np.zeros((10, 20, 30)) %timeit np.einsum('abc->cba', a) 2.24 µs ± 375 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit np.einsum(a, [0, 1, 2], [2, 1, 0]) 2.65 µs ± 132 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each) %timeit np.moveaxis(a, [0, 1, 2], [2, 1, 0]) 22.1 µs ± 3.47 µs per loop (mean ± std. dev. of 7 runs, 100000 loops each)
Perhaps we should take advantage of this, especally since it would counteract the performance cost of #9475
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Brought up by this comment, it turns out that
einsum
actually is another name for moveaxis, and is 10 times fasterPerhaps we should take advantage of this, especally since it would counteract the performance cost of #9475
The text was updated successfully, but these errors were encountered: