Skip to content

Commit b0ab1c7

Browse files
jbrockmendelWillAyd
authored andcommitted
Remove legacy scipy compatt (#30072)
1 parent 9fe4cbb commit b0ab1c7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pandas/core/nanops.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1248,10 +1248,9 @@ def _pearson(a, b):
12481248
return np.corrcoef(a, b)[0, 1]
12491249

12501250
def _kendall(a, b):
1251+
# kendallttau returns a tuple of the tau statistic and pvalue
12511252
rs = kendalltau(a, b)
1252-
if isinstance(rs, tuple):
1253-
return rs[0]
1254-
return rs
1253+
return rs[0]
12551254

12561255
def _spearman(a, b):
12571256
return spearmanr(a, b)[0]

0 commit comments

Comments
 (0)