numpy.fromfunction()
numpy.fromfunction
-
numpy.fromfunction(function, shape, **kwargs)
[source] -
Construct an array by executing a function over each coordinate.
The resulting array therefore has a value
fn(x, y, z)
at coordinate(x, y, z)
.Parameters: function : callable
The function is called with N parameters, where N is the rank of
shape
. Each parameter represents the coordinates of the array varying along a specific axis. F