def _multiply(self, f1, f2, out):
        """Pointwise multiplication of ``f1`` and ``f2``.

        Notes
        -----
        The multiplication is implemented with a simple Python
        function, so the non-vectorized versions are slow.
        """
        # Avoid infinite recursions by making a copy of the functions
        f1_copy = f1.copy()
        f2_copy = f2.copy()

        def product_oop(x, **kwargs):
            """Product out-of-place evaluation function."""
            return np.asarray(f1_copy(x, **kwargs) * f2_copy(x, **kwargs),
                              dtype=self.scalar_out_dtype)

        out._call_out_of_place = product_oop
        decorator = preload_first_arg(out, 'in-place')
        out._call_in_place = decorator(_default_in_place)
        out._call_has_out = out._call_out_optional = False
        return out
def _multiply ( self , f1 , f2 , out ) : f1_copy = f1 . copy ( ) f2_copy = f2 . copy ( ) def product_oop ( x , ** kwargs ) : return np . asarray ( f1_copy ( x , ** kwargs ) * f2_copy ( x , ** kwargs ) , dtype = self . scalar_out_dtype ) out . _call_out_of_place = product_oop decorator = preload_first_arg ( out , 'in-place' ) out . _call_in_place = decorator ( _default_in_place ) out . _call_has_out = out . _call_out_optional = False return out
Pointwise multiplication of ``f1`` and ``f2``.

        Notes
        -----
        The multiplication is implemented with a simple Python
        function, so the non-vectorized versions are slow.