@@ -2274,33 +2274,6 @@ def test_evaluate_equal_dim_and_num_lt(self):
22742274 np .testing .assert_array_almost_equal (y , y_expected , 7 )
22752275
22762276
2277- def test_contiguous_regions ():
2278- a , b , c = 3 , 4 , 5
2279- # Starts and ends with True
2280- mask = [True ]* a + [False ]* b + [True ]* c
2281- expected = [(0 , a ), (a + b , a + b + c )]
2282- with pytest .warns (MatplotlibDeprecationWarning ):
2283- assert mlab .contiguous_regions (mask ) == expected
2284- d , e = 6 , 7
2285- # Starts with True ends with False
2286- mask = mask + [False ]* e
2287- with pytest .warns (MatplotlibDeprecationWarning ):
2288- assert mlab .contiguous_regions (mask ) == expected
2289- # Starts with False ends with True
2290- mask = [False ]* d + mask [:- e ]
2291- expected = [(d , d + a ), (d + a + b , d + a + b + c )]
2292- with pytest .warns (MatplotlibDeprecationWarning ):
2293- assert mlab .contiguous_regions (mask ) == expected
2294- # Starts and ends with False
2295- mask = mask + [False ]* e
2296- with pytest .warns (MatplotlibDeprecationWarning ):
2297- assert mlab .contiguous_regions (mask ) == expected
2298- # No True in mask
2299- assert mlab .contiguous_regions ([False ]* 5 ) == []
2300- # Empty mask
2301- assert mlab .contiguous_regions ([]) == []
2302-
2303-
23042277def test_psd_onesided_norm ():
23052278 u = np .array ([0 , 1 , 2 , 3 , 1 , 2 , 1 ])
23062279 dt = 1.0
0 commit comments