Skip to content

Commit 2b79656

Browse files
author
y-p
committed
Merge pull request #5399 from tr11/fix_flex_binary_moment_type_check
Display the correct error message when calling a binary moment without appropriate parameters.
2 parents eb6ef91 + fb43123 commit 2b79656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/stats/moments.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def _get_corr(a, b):
195195

196196
def _flex_binary_moment(arg1, arg2, f):
197197
if not (isinstance(arg1,(np.ndarray, Series, DataFrame)) and
198-
isinstance(arg1,(np.ndarray, Series, DataFrame))):
198+
isinstance(arg2,(np.ndarray, Series, DataFrame))):
199199
raise ValueError("arguments to moment function must be of type ndarray/DataFrame")
200200

201201
if isinstance(arg1, (np.ndarray,Series)) and isinstance(arg2, (np.ndarray,Series)):

0 commit comments

Comments
 (0)