sdc
sdc copied to clipboard
Series.cov and Series.corr yield invalid results for complex-typed argument
Given these series:
S1 = pandas.Series([1.0, -1.5]),
S2 = pandas.Series([complex(-4.5, 1.0), complex(3.0, 1.5)])
The hpat and "normal" functions return different results:
# corr
hpat_func(S1, S2) # => (-1+0j)
test_impl(S1, S2) # => (-0.9977851578566089+0.06651901052377393j)
# cov
hpat_func(S1, S2) # => (-9.375-0.625j)
test_impl(S1, S2) # => (-9.375+0.625j)
Functions that should be fixes are probably _column_corr_impl and _column_cov_impl.