xtensor
xtensor copied to clipboard
numpy.fromfunction equivalent
Example;
import numpy as np
np.fromfunction(lambda i, j: i == j, (2, 3), dtype=int)
Would be nice to have an inbuilt equivalent.
Do I understand that it is a wrapper around meshgrid
and https://xtensor.readthedocs.io/en/latest/operator.html#universal-functions-and-vectorization ? If so, the wrapper should be easy to implement. Would you be willing to give it a shot?