@Substitution(name='<STR_LIT>')<EOL><INDENT>@Appender(_doc_template)<EOL>@Appender(_pairwise_template)<EOL>def corr(self, other=None, pairwise=None, **kwargs):<DEDENT>
if other is None:<EOL><INDENT>other = self._selected_obj<EOL>pairwise = True if pairwise is None else pairwise<EOL><DEDENT>other = self._shallow_copy(other)<EOL>def _get_corr(X, Y):<EOL><INDENT>X = self._shallow_copy(X)<EOL>Y = self._shallow_copy(Y)<EOL>def _cov(x, y):<EOL><INDENT>return libwindow.ewmcov(x, y, self.com, int(self.adjust),<EOL>int(self.ignore_na),<EOL>int(self.min_periods),<EOL><NUM_LIT:1>)<EOL><DEDENT>x_values = X._prep_values()<EOL>y_values = Y._prep_values()<EOL>with np.errstate(all='<STR_LIT:ignore>'):<EOL><INDENT>cov = _cov(x_values, y_values)<EOL>x_var = _cov(x_values, x_values)<EOL>y_var = _cov(y_values, y_values)<EOL>corr = cov / _zsqrt(x_var * y_var)<EOL><DEDENT>return X._wrap_result(corr)<EOL><DEDENT>return _flex_binary_moment(self._selected_obj, other._selected_obj,<EOL>_get_corr, pairwise=bool(pairwise))<EOL>
Exponential weighted sample correlation.