Skip to content

Commit efd0c3c

Browse files
Benjamin Grossadamklein
Benjamin Gross
authored andcommitted
BUGFIX: stats.ewmcov
If com is None, an error is returned because result requires com when bias is false.
1 parent f5e5b14 commit efd0c3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/stats/moments.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def ewmcov(arg1, arg2, com=None, span=None, min_periods=0, bias=False,
317317
mean = lambda x: ewma(x, com=com, span=span, min_periods=min_periods)
318318

319319
result = (mean(X*Y) - mean(X) * mean(Y))
320-
320+
com = _get_center_of_mass(com, span)
321321
if not bias:
322322
result *= (1.0 + 2.0 * com) / (2.0 * com)
323323

0 commit comments

Comments
 (0)