@stdlib/array
Version:
Arrays.
30 lines (22 loc) • 736 B
Plain Text
{{alias}}( arrays, shape, fcn )
Applies a unary callback to elements in an n-dimensional nested input array
and assigns results to elements in an n-dimensional nested output array.
Parameters
----------
arrays: ArrayLikeObject
Array-like object containing one input nested array and one output
nested array.
shape: Array<integer>
Array shape.
fcn: Function
Unary callback.
Examples
--------
> var x = [ [ -1.0, -2.0 ], [ -3.0, -4.0 ] ];
> var y = [ [ 0.0, 0.0 ], [ 0.0, 0.0 ] ];
> var shape = [ 2, 2 ];
> {{alias}}( [ x, y ], shape, {{alias:@stdlib/math/base/special/abs}} );
> y
[ [ 1.0, 2.0 ], [ 3.0, 4.0 ] ]
See Also
--------