{{alias}}( x, fcn[, thisArg] ) Fills an input ndarray according to a callback function. The function *mutates* the input ndarray. The function assumes that each element in the underlying input ndarray data buffer has one, and only one, corresponding element in input ndarray view (i.e., a provided ndarray is not a broadcasted ndarray view). The callback function is provided the following arguments: - value: current array element. - indices: current array element indices. - arr: the input ndarray. Parameters ---------- x: ndarrayLike Input ndarray. fcn: Function Callback function. thisArg: any (optional) Callback function execution context. Returns ------- out: ndarrayLike Input ndarray. Examples -------- > var opts = { 'dtype': 'float64' }; > var x = {{alias:@stdlib/ndarray/zeros}}( [ 2, 2 ], opts ); > function fcn() { return 10.0; }; > var out = {{alias}}( x, fcn ) [ [ 10.0, 10.0 ], [ 10.0, 10.0 ] ] > var bool = ( out === x ) true See Also --------