Skip to content

Commit fb43123

Browse files
committed
Display the correct error message when calling a binary moment without appropriate parameters.
1 parent 78a5112 commit fb43123

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
@@ -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)