ones4d
Create a four-dimensional nested array filled with ones.
Usage
var ones4d = require( '@stdlib/array/base/ones4d' );
ones4d( shape )
Returns a four-dimensional nested array filled with ones.
var out = ones4d( [ 1, 1, 2, 3 ] );
// returns [ [ [ [ 1.0, 1.0, 1.0 ], [ 1.0, 1.0, 1.0 ] ] ] ]
Examples
var ones4d = require( '@stdlib/array/base/ones4d' );
var out = ones4d( [ 1, 1, 1, 3 ] );
// returns [ [ [ [ 1.0, 1.0, 1.0 ] ] ] ]
out = ones4d( [ 1, 1, 3, 1 ] );
// returns [ [ [ [ 1.0 ], [ 1.0 ], [ 1.0 ] ] ] ]