zerosnd
Create a zero-filled n-dimensional nested array.
Usage
var zerosnd = require( '@stdlib/array/base/zerosnd' );
zerosnd( shape )
Returns a zero-filled n-dimensional nested array.
var out = zerosnd( [ 2, 3 ] );
// returns [ [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.0 ] ]
Examples
var zerosnd = require( '@stdlib/array/base/zerosnd' );
var out = zerosnd( [ 1, 3 ] );
// returns [ [ 0.0, 0.0, 0.0 ] ]
out = zerosnd( [ 3, 1 ] );
// returns [ [ 0.0 ], [ 0.0 ], [ 0.0 ] ]
out = zerosnd( [ 1, 1, 3 ] );
// returns [ [ [ 0.0, 0.0, 0.0 ] ] ]
out = zerosnd( [ 1, 3, 1 ] );
// returns [ [ [ 0.0 ], [ 0.0 ], [ 0.0 ] ] ]
out = zerosnd( [ 1, 1, 1, 3 ] );
// returns [ [ [ [ 0.0, 0.0, 0.0 ] ] ] ]