zeros4d

Create a zero-filled four-dimensional nested array.

Usage

var zeros4d = require( '@stdlib/array/base/zeros4d' );

zeros4d( shape )

Returns a zero-filled four-dimensional nested array.

var out = zeros4d( [ 1, 1, 2, 3 ] );
// returns [ [ [ [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.0 ] ] ] ]

Examples

var zeros4d = require( '@stdlib/array/base/zeros4d' );

var out = zeros4d( [ 1, 1, 1, 3 ] );
// returns [ [ [ [ 0.0, 0.0, 0.0 ] ] ] ]

out = zeros4d( [ 1, 1, 3, 1 ] );
// returns [ [ [ [ 0.0 ], [ 0.0 ], [ 0.0 ] ] ] ]
Did you find this page helpful?