We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87db308 commit b6b6023Copy full SHA for b6b6023
pandas/stats/moments.py
@@ -197,6 +197,10 @@ def _get_corr(a, b):
197
198
199
def _flex_binary_moment(arg1, arg2, f):
200
+ if not (isinstance(arg1,(np.ndarray, DataFrame)) and
201
+ isinstance(arg1,(np.ndarray, DataFrame))):
202
+ raise ValueError("arguments to moment function must be of type ndarray/DataFrame")
203
+
204
if isinstance(arg1, np.ndarray) and isinstance(arg2, np.ndarray):
205
X, Y = _prep_binary(arg1, arg2)
206
return f(X, Y)
0 commit comments