@@ -721,25 +721,29 @@ def test_detrend_mean_1D_base_slope_off_list_axis0(self):
721
721
def test_demean_0D_off (self ):
722
722
input = 5.5
723
723
targ = 0.
724
- res = mlab .demean (input , axis = None )
724
+ with pytest .warns (MatplotlibDeprecationWarning ):
725
+ res = mlab .demean (input , axis = None )
725
726
assert_almost_equal (res , targ )
726
727
727
728
def test_demean_1D_base_slope_off (self ):
728
729
input = self .sig_base + self .sig_slope + self .sig_off
729
730
targ = self .sig_base + self .sig_slope_mean
730
- res = mlab .demean (input )
731
+ with pytest .warns (MatplotlibDeprecationWarning ):
732
+ res = mlab .demean (input )
731
733
assert_allclose (res , targ , atol = 1e-08 )
732
734
733
735
def test_demean_1D_base_slope_off_axis0 (self ):
734
736
input = self .sig_base + self .sig_slope + self .sig_off
735
737
targ = self .sig_base + self .sig_slope_mean
736
- res = mlab .demean (input , axis = 0 )
738
+ with pytest .warns (MatplotlibDeprecationWarning ):
739
+ res = mlab .demean (input , axis = 0 )
737
740
assert_allclose (res , targ , atol = 1e-08 )
738
741
739
742
def test_demean_1D_base_slope_off_list (self ):
740
743
input = self .sig_base + self .sig_slope + self .sig_off
741
744
targ = self .sig_base + self .sig_slope_mean
742
- res = mlab .demean (input .tolist ())
745
+ with pytest .warns (MatplotlibDeprecationWarning ):
746
+ res = mlab .demean (input .tolist ())
743
747
assert_allclose (res , targ , atol = 1e-08 )
744
748
745
749
def test_detrend_mean_2D_default (self ):
@@ -906,7 +910,8 @@ def test_demean_2D_default(self):
906
910
self .sig_base + self .sig_slope_mean ]
907
911
input = np .vstack (arri ).T
908
912
targ = np .vstack (arrt ).T
909
- res = mlab .demean (input )
913
+ with pytest .warns (MatplotlibDeprecationWarning ):
914
+ res = mlab .demean (input )
910
915
assert_allclose (res , targ ,
911
916
atol = 1e-08 )
912
917
@@ -917,7 +922,8 @@ def test_demean_2D_none(self):
917
922
self .sig_base ]
918
923
input = np .vstack (arri )
919
924
targ = np .vstack (arrt )
920
- res = mlab .demean (input , axis = None )
925
+ with pytest .warns (MatplotlibDeprecationWarning ):
926
+ res = mlab .demean (input , axis = None )
921
927
assert_allclose (res , targ ,
922
928
atol = 1e-08 )
923
929
@@ -932,7 +938,8 @@ def test_demean_2D_axis0(self):
932
938
self .sig_base + self .sig_slope_mean ]
933
939
input = np .vstack (arri ).T
934
940
targ = np .vstack (arrt ).T
935
- res = mlab .demean (input , axis = 0 )
941
+ with pytest .warns (MatplotlibDeprecationWarning ):
942
+ res = mlab .demean (input , axis = 0 )
936
943
assert_allclose (res , targ ,
937
944
atol = 1e-08 )
938
945
@@ -947,7 +954,8 @@ def test_demean_2D_axis1(self):
947
954
self .sig_base + self .sig_slope_mean ]
948
955
input = np .vstack (arri )
949
956
targ = np .vstack (arrt )
950
- res = mlab .demean (input , axis = 1 )
957
+ with pytest .warns (MatplotlibDeprecationWarning ):
958
+ res = mlab .demean (input , axis = 1 )
951
959
assert_allclose (res , targ ,
952
960
atol = 1e-08 )
953
961
@@ -962,7 +970,8 @@ def test_demean_2D_axism1(self):
962
970
self .sig_base + self .sig_slope_mean ]
963
971
input = np .vstack (arri )
964
972
targ = np .vstack (arrt )
965
- res = mlab .demean (input , axis = - 1 )
973
+ with pytest .warns (MatplotlibDeprecationWarning ):
974
+ res = mlab .demean (input , axis = - 1 )
966
975
assert_allclose (res , targ ,
967
976
atol = 1e-08 )
968
977
0 commit comments