Skip to content
New issue

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

enhancement: axes keyword for cross #13233

Open
2sn opened this issue Mar 31, 2019 · 1 comment
Open

enhancement: axes keyword for cross #13233

2sn opened this issue Mar 31, 2019 · 1 comment

Comments

@2sn
Copy link
Contributor

2sn commented Mar 31, 2019

It would be great to have an "axes" keyword in np.cross for consistent API to np.tensordot.

Reproducing code example:

import numpy as np
a = [1, 2, 3]
b = [4, 5, 6]
np.cross(a, b, axes = (-1, -1))

Currently, rather ugly axisa, axisb, axisc, or just axis have to be provided. I assume it could be added to overwrite the existing keywords for backward compatibility. I propose that the new axes keyword may be an iterable (or tuple) of length two or three, withe the third value defaulting to axisc or -1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants