Skip to content

call np.cross with 3D vectors only #8993

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

Merged
merged 3 commits into from
May 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions xarray/tests/test_computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2500,32 +2500,32 @@ def test_polyfit_polyval_integration(
[
xr.DataArray([1, 2, 3]),
xr.DataArray([4, 5, 6]),
[1, 2, 3],
[4, 5, 6],
np.array([1, 2, 3]),
np.array([4, 5, 6]),
"dim_0",
-1,
],
[
xr.DataArray([1, 2]),
xr.DataArray([4, 5, 6]),
[1, 2],
[4, 5, 6],
np.array([1, 2, 0]),
np.array([4, 5, 6]),
"dim_0",
-1,
],
[
xr.Variable(dims=["dim_0"], data=[1, 2, 3]),
xr.Variable(dims=["dim_0"], data=[4, 5, 6]),
[1, 2, 3],
[4, 5, 6],
np.array([1, 2, 3]),
np.array([4, 5, 6]),
"dim_0",
-1,
],
[
xr.Variable(dims=["dim_0"], data=[1, 2]),
xr.Variable(dims=["dim_0"], data=[4, 5, 6]),
[1, 2],
[4, 5, 6],
np.array([1, 2, 0]),
np.array([4, 5, 6]),
"dim_0",
-1,
],
Expand Down Expand Up @@ -2564,8 +2564,8 @@ def test_polyfit_polyval_integration(
dims=["cartesian"],
coords=dict(cartesian=(["cartesian"], ["x", "y", "z"])),
),
[0, 0, 1],
[4, 5, 6],
np.array([0, 0, 1]),
np.array([4, 5, 6]),
"cartesian",
-1,
],
Expand All @@ -2580,8 +2580,8 @@ def test_polyfit_polyval_integration(
dims=["cartesian"],
coords=dict(cartesian=(["cartesian"], ["x", "y", "z"])),
),
[1, 0, 2],
[4, 5, 6],
np.array([1, 0, 2]),
np.array([4, 5, 6]),
"cartesian",
-1,
],
Expand Down
Loading