@@ -431,6 +431,7 @@ def apply_array_func(func, *args, **kwargs):
431431 """
432432 Apply an array function.
433433 """
434+ _raise_on_out (kwargs )
434435 # Only handle functions involving Patches
435436 patches = _find_patches (args , kwargs )
436437 assert len (patches ), "No patches found in apply_array_func"
@@ -498,6 +499,7 @@ def apply_ufunc(ufunc, *args, **kwargs):
498499 -----
499500 See [numpy's ufunc docs](https://numpy.org/doc/stable/reference/ufuncs.html)
500501 """
502+ _raise_on_out (kwargs )
501503 is_ufunc = isinstance (ufunc , np .ufunc )
502504 if is_ufunc :
503505 key = (ufunc .nin , ufunc .nout )
@@ -527,7 +529,6 @@ def patch_array_ufunc(self, ufunc, method, *inputs, **kwargs):
527529 """
528530 Called when a numpy ufunc is applied to a patch (__array_ufunc__).
529531 """
530- _raise_on_out (kwargs )
531532 method = ufunc if method == "__call__" else getattr (ufunc , method , ufunc )
532533 return apply_ufunc (method , * inputs , ** kwargs )
533534
@@ -548,6 +549,5 @@ def patch_array_function(self, func, types, args, kwargs):
548549 Keyword arguments to the function.
549550 """
550551 # Only handle functions involving Patches
551- _raise_on_out (kwargs )
552552 assert any (issubclass (t , dc .Patch ) for t in types )
553553 return apply_array_func (func , * args , ** kwargs )
0 commit comments