Skip to content

Commit a9d1ef9

Browse files
authored
Merge pull request numpy#26692 from rgommers/doc-cross2d-oneliner
DOC: document workaround for deprecation of dim-2 inputs to `cross`
2 parents 9353105 + 9fb7218 commit a9d1ef9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

numpy/_core/numeric.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +1565,12 @@ def cross(a, b, axisa=-1, axisb=-1, axisc=-1, axis=None):
15651565
15661566
Supports full broadcasting of the inputs.
15671567
1568+
Dimension-2 input arrays were deprecated in 2.0.0. If you do need this
1569+
functionality, you can use::
1570+
1571+
def cross2d(x, y):
1572+
return x[..., 0] * y[..., 1] - x[..., 1] * y[..., 0]
1573+
15681574
Examples
15691575
--------
15701576
Vector cross-product.

0 commit comments

Comments
 (0)