def __array_ufunc__(self, ufunc, method, *inputs, **kwargs):
        '''
        Overwrites the action of weld supported functions and for others,
        pass on to numpy's implementation.
        @ufunc: np op, like np.add etc.
        TODO: support other type of methods?
        @method: call, __reduce__,
        '''
        input_args = [inp for inp in inputs]
        outputs = kwargs.pop('out', None)
        supported = self._process_ufunc_inputs(input_args, outputs)
        output = None
        if supported and method == '__call__':
            output = self._handle_call(ufunc, input_args, outputs)
        elif supported and method == 'reduce':
            output = self._handle_reduce(ufunc, input_args, outputs)

        if output is not None:
            return output

        return self._handle_numpy(ufunc, method, input_args, outputs, kwargs)
def __array_ufunc__ ( self , ufunc , method , * inputs , ** kwargs ) : input_args = [ inp for inp in inputs ] outputs = kwargs . pop ( 'out' , None ) supported = self . _process_ufunc_inputs ( input_args , outputs ) output = None if supported and method == '__call__' : output = self . _handle_call ( ufunc , input_args , outputs ) elif supported and method == 'reduce' : output = self . _handle_reduce ( ufunc , input_args , outputs ) if output is not None : return output return self . _handle_numpy ( ufunc , method , input_args , outputs , kwargs )
Overwrites the action of weld supported functions and for others,
        pass on to numpy's implementation.
        @ufunc: np op, like np.add etc.
        TODO: support other type of methods?
        @method: call, __reduce__,