From e47004e10bcf71ffab4f5e779c33193f9f1ddad3 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Wed, 4 Dec 2019 16:29:04 -0800 Subject: [PATCH] Remove legacy scipy compatt --- pandas/core/nanops.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/core/nanops.py b/pandas/core/nanops.py index a2a40bbf93604..9e436ec4c6c13 100644 --- a/pandas/core/nanops.py +++ b/pandas/core/nanops.py @@ -1248,10 +1248,9 @@ def _pearson(a, b): return np.corrcoef(a, b)[0, 1] def _kendall(a, b): + # kendallttau returns a tuple of the tau statistic and pvalue rs = kendalltau(a, b) - if isinstance(rs, tuple): - return rs[0] - return rs + return rs[0] def _spearman(a, b): return spearmanr(a, b)[0]