@@ -1502,10 +1502,11 @@ def test_dot_dataarray(dtype):
1502
1502
data_array = xr .DataArray (data = array1 , dims = ("x" , "y" ))
1503
1503
other = xr .DataArray (data = array2 , dims = ("y" , "z" ))
1504
1504
1505
- expected = attach_units (
1506
- xr .dot (strip_units (data_array ), strip_units (other )), {None : unit_registry .m }
1507
- )
1508
- actual = xr .dot (data_array , other )
1505
+ with xr .set_options (use_opt_einsum = False ):
1506
+ expected = attach_units (
1507
+ xr .dot (strip_units (data_array ), strip_units (other )), {None : unit_registry .m }
1508
+ )
1509
+ actual = xr .dot (data_array , other )
1509
1510
1510
1511
assert_units_equal (expected , actual )
1511
1512
assert_identical (expected , actual )
@@ -2465,8 +2466,9 @@ def test_binary_operations(self, func, dtype):
2465
2466
data_array = xr .DataArray (data = array )
2466
2467
2467
2468
units = extract_units (func (array ))
2468
- expected = attach_units (func (strip_units (data_array )), units )
2469
- actual = func (data_array )
2469
+ with xr .set_options (use_opt_einsum = False ):
2470
+ expected = attach_units (func (strip_units (data_array )), units )
2471
+ actual = func (data_array )
2470
2472
2471
2473
assert_units_equal (expected , actual )
2472
2474
assert_identical (expected , actual )
@@ -3829,8 +3831,9 @@ def test_computation(self, func, variant, dtype):
3829
3831
if not isinstance (func , (function , method )):
3830
3832
units .update (extract_units (func (array .reshape (- 1 ))))
3831
3833
3832
- expected = attach_units (func (strip_units (data_array )), units )
3833
- actual = func (data_array )
3834
+ with xr .set_options (use_opt_einsum = False ):
3835
+ expected = attach_units (func (strip_units (data_array )), units )
3836
+ actual = func (data_array )
3834
3837
3835
3838
assert_units_equal (expected , actual )
3836
3839
assert_identical (expected , actual )
0 commit comments