Check array type after is_fusing
@@ -21,8 +21,6 @@ def all(a, axis=None, out=None, keepdims=False):
.. seealso:: :func:`numpy.all`
"""
- util.check_array(a, arg_name='a')
-
if fusion._is_fusing():
if keepdims:
raise NotImplementedError(
@@ -30,6 +28,8 @@ def all(a, axis=None, out=None, keepdims=False):
return fusion._call_reduction(
_logic.all, a, axis=axis, out=out)
+ util.check_array(a, arg_name='a')
+
return a.all(axis=axis, out=out, keepdims=keepdims)
@@ -50,8 +50,6 @@ def any(a, axis=None, out=None, keepdims=False):
.. seealso:: :func:`numpy.any`
"""
- util.check_array(a, arg_name='a')
-
if fusion._is_fusing():
if keepdims:
raise NotImplementedError(
@@ -59,6 +57,8 @@ def any(a, axis=None, out=None, keepdims=False):
return fusion._call_reduction(
_logic.any, a, axis=axis, out=out)
+ util.check_array(a, arg_name='a')
+
return a.any(axis=axis, out=out, keepdims=keepdims)
