ones5d

Create a five-dimensional nested array filled with ones.

Usage

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

ones5d( shape )

Returns a five-dimensional nested array filled with ones.

var out = ones5d( [ 1, 1, 1, 2, 3 ] );
// returns [ [ [ [ [ 1.0, 1.0, 1.0 ], [ 1.0, 1.0, 1.0 ] ] ] ] ]

Examples

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

var out = ones5d( [ 1, 1, 1, 1, 3 ] );
// returns [ [ [ [ [ 1.0, 1.0, 1.0 ] ] ] ] ]

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