@@ -3570,12 +3570,9 @@ def test_array_likes(self):
3570
3570
3571
3571
3572
3572
class TestCross :
3573
10000
- warning_filter_2_dim : str = (
3574
- "ignore:.*2-dimensional input arrays "
3575
- "are deprecated.*:DeprecationWarning"
3573
+ @pytest .mark .filterwarnings (
3574
+ "ignore:.*2-dimensional input arrays.*:DeprecationWarning"
3576
3575
)
3577
-
3578
- @pytest .mark .filterwarnings (warning_filter_2_dim )
3579
3576
def test_2x2 (self ):
3580
3577
u = [1 , 2 ]
3581
3578
v = [3 , 4 ]
@@ -3585,7 +3582,9 @@ def test_2x2(self):
3585
3582
cp = np .cross (v , u )
3586
3583
assert_equal (cp , - z )
3587
3584
3588
- @pytest .mark .filterwarnings (warning_filter_2_dim )
3585
+ @pytest .mark .filterwarnings (
3586
+ "ignore:.*2-dimensional input arrays.*:DeprecationWarning"
3587
+ )
3589
3588
def test_2x3 (self ):
3590
3589
u = [1 , 2 ]
3591
3590
v = [3 , 4 , 5 ]
@@ -3604,7 +3603,9 @@ def test_3x3(self):
3604
3603
cp = np .cross (v , u )
3605
3604
assert_equal (cp , - z )
3606
3605
3607
- @pytest .mark .filterwarnings (warning_filter_2_dim )
3606
+ @pytest .mark .filterwarnings (
3607
+ "ignore:.*2-dimensional input arrays.*:DeprecationWarning"
3608
+ )
3608
3609
def test_broadcasting (self ):
3609
3610
# Ticket #2624 (Trac #2032)
3610
3611
u = np .tile ([1 , 2 ], (11 , 1 ))
@@ -3635,7 +3636,9 @@ def test_broadcasting(self):
3635
3636
assert_equal (np .cross (v .T , u ), - z )
3636
3637
assert_equal (np .cross (u , u ), 0 )
3637
3638
3638
- @pytest .mark .filterwarnings (warning_filter_2_dim )
3639
+ @pytest .mark .filterwarnings (
3640
+ "ignore:.*2-dimensional input arrays.*:DeprecationWarning"
3641
+ )
3639
3642
def test_broadcasting_shapes (self ):
3640
3643
u = np .ones ((2 , 1 , 3 ))
3641
3644
v = np .ones ((5 , 3 ))
0 commit comments