Skip to content

Commit a688f4c

Browse files
max-sixtyclaude
andcommitted
Remove redundant numpy imports in test functions
Co-authored-by: Claude <[email protected]>
1 parent e5757f9 commit a688f4c

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

xarray/tests/test_assertions.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,6 @@ def test_assert_equal_transpose_datatree() -> None:
116116
xr.testing.assert_equal(a, b, check_dim_order=False)
117117

118118
# Test with mixed dimension orders in datasets (the tricky case)
119-
import numpy as np
120-
121119
ds_mixed = xr.Dataset(
122120
{
123121
"foo": xr.DataArray(np.zeros([4, 5]), dims=("a", "b")),
@@ -265,8 +263,6 @@ def __array__(
265263

266264
def test_assert_equal_dataset_check_dim_order():
267265
"""Test for issue #10704 - check_dim_order=False with Datasets containing mixed dimension orders."""
268-
import numpy as np
269-
270266
# Dataset with variables having different dimension orders
271267
dataset_1 = xr.Dataset(
272268
{
@@ -318,8 +314,6 @@ def test_assert_equal_dataset_check_dim_order():
318314

319315
def test_assert_equal_no_common_dims():
320316
"""Test assert_equal when objects have no common dimensions."""
321-
import numpy as np
322-
323317
# DataArrays with completely different dimensions
324318
da1 = xr.DataArray(np.zeros([4, 5]), dims=("x", "y"))
325319
da2 = xr.DataArray(np.zeros([3, 2]), dims=("a", "b"))
@@ -349,8 +343,6 @@ def test_assert_equal_no_common_dims():
349343

350344
def test_assert_equal_variable_transpose():
351345
"""Test assert_equal with transposed Variable objects."""
352-
import numpy as np
353-
354346
# Variables with transposed dimensions
355347
var1 = xr.Variable(("x", "y"), np.zeros([4, 5]))
356348
var2 = xr.Variable(("y", "x"), np.zeros([5, 4]))

0 commit comments

Comments
 (0)