chainerx.fromfunction

chainerx.fromfunction(function, shape, **kwargs)

Constructs an array by executing a function over each coordinate.

This is currently equivalent to numpy.fromfunction() wrapped by chainerx.array(), given the device argument.

Note

Keywords other than dtype and device are passed to `function`.