numpy.frompyfunc()

numpy.frompyfunc

numpy.frompyfunc(func, nin, nout)

Takes an arbitrary Python function and returns a Numpy ufunc.

Can be used, for example, to add broadcasting to a built-in Python function (see Examples section).

Parameters:

func : Python function object

An arbitrary Python function.

nin : int

The number of input arguments.

nout : int

The number of objects returned by func.

Returns:

out : ufunc

Returns a Numpy universal fu