@@ -42,13 +42,14 @@ def test_cov(self, datetime_series):
42
42
assert isna (ts1 .cov (ts2 , min_periods = 12 ))
43
43
44
44
@pytest .mark .parametrize ("test_ddof" , [None , 0 , 1 , 2 , 3 ])
45
- def test_cov_ddof (self , test_ddof ):
45
+ @pytest .mark .parametrize ("dtype" , ["float64" , "Float64" ])
46
+ def test_cov_ddof (self , test_ddof , dtype ):
46
47
# GH#34611
47
48
np_array1 = np .random .rand (10 )
48
49
np_array2 = np .random .rand (10 )
49
50
50
- s1 = Series (np_array1 )
51
- s2 = Series (np_array2 )
51
+ s1 = Series (np_array1 , dtype = dtype )
52
+ s2 = Series (np_array2 , dtype = dtype )
52
53
53
54
result = s1 .cov (s2 , ddof = test_ddof )
54
55
expected = np .cov (np_array1 , np_array2 , ddof = test_ddof )[0 ][1 ]
@@ -57,9 +58,12 @@ def test_cov_ddof(self, test_ddof):
57
58
58
59
class TestSeriesCorr :
59
60
@td .skip_if_no_scipy
60
- def test_corr (self , datetime_series ):
61
+ @pytest .mark .parametrize ("dtype" , ["float64" , "Float64" ])
62
+ def test_corr (self , datetime_series , dtype ):
61
63
from scipy import stats
62
64
65
+ datetime_series = datetime_series .astype (dtype )
66
+
63
67
# full overlap
64
68
tm .assert_almost_equal (datetime_series .corr (datetime_series ), 1 )
65
69
0 commit comments