Callback invoked for each array element.
Callback invoked for each array element.
Callback invoked for each array element.
Callback invoked for each array element.
Callback invoked for each array element.
Applies a function to each nested element in a three-dimensional nested array and assigns the result to a nested element in a new three-dimensional nested array.
The applied function is provided the following arguments:
three-dimensional nested array
function to apply
input function context
three-dimensional nested array
var naryFunction = require( '@stdlib/utils/nary-function' );
var abs = require( '@stdlib/math/base/special/abs' );
var arr = [
[ [ -1, -2, -3 ] ],
[ [ -4, -5, -6 ] ]
];
var out = map3d( arr, naryFunction( abs, 1 ) );
// returns [ [ [ 1, 2, 3 ] ], [ [ 4, 5, 6 ] ] ]
Three-dimensional input array.