@@ -674,7 +674,7 @@ def f(x):
674674
675675 self ._check_moment_func (np .mean , name = "apply" , func = f , raw = raw )
676676
677- expected = Series ([] )
677+ expected = Series (dtype = "float64" )
678678 result = expected .rolling (10 ).apply (lambda x : x .mean (), raw = raw )
679679 tm .assert_series_equal (result , expected )
680680
@@ -1201,7 +1201,7 @@ def _check_ew(self, name=None, preserve_nan=False):
12011201
12021202 # check series of length 0
12031203 result = getattr (Series ().ewm (com = 50 , min_periods = min_periods ), name )()
1204- tm .assert_series_equal (result , Series ())
1204+ tm .assert_series_equal (result , Series (dtype = "float64" ))
12051205
12061206 # check series of length 1
12071207 result = getattr (Series ([1.0 ]).ewm (50 , min_periods = min_periods ), name )()
@@ -1996,8 +1996,8 @@ def func(A, B, com, **kwargs):
19961996 assert not np .isnan (result .values [11 :]).any ()
19971997
19981998 # check series of length 0
1999- result = func (Series ([] ), Series ([] ), 50 , min_periods = min_periods )
2000- tm .assert_series_equal (result , Series ([] ))
1999+ result = func (Series (), Series (), 50 , min_periods = min_periods )
2000+ tm .assert_series_equal (result , Series (dtype = "float64" ))
20012001
20022002 # check series of length 1
20032003 result = func (Series ([1.0 ]), Series ([1.0 ]), 50 , min_periods = min_periods )
@@ -2197,7 +2197,7 @@ def test_rolling_functions_window_non_shrinkage_binary(self):
21972197
21982198 def test_moment_functions_zero_length (self ):
21992199 # GH 8056
2200- s = Series ()
2200+ s = Series (dtype = "float64" )
22012201 s_expected = s
22022202 df1 = DataFrame ()
22032203 df1_expected = df1
@@ -2416,7 +2416,7 @@ def expanding_mean(x, min_periods=1):
24162416 # here to make this pass
24172417 self ._check_expanding (expanding_mean , np .mean , preserve_nan = False )
24182418
2419- ser = Series ([])
2419+ ser = Series ([], dtype = "float64" )
24202420 tm .assert_series_equal (ser , ser .expanding ().apply (lambda x : x .mean (), raw = raw ))
24212421
24222422 # GH 8080
0 commit comments