{{alias}}( ndims, x, dims, writable ) Expands the shape of an array to a specified dimensionality by spreading its dimensions to specified dimension indices and inserting dimensions of size one for the remaining dimensions. Each provided dimension index must reside on the interval [-ndims, ndims-1]. If provided a negative dimension index, the position at which to place a respective dimension is computed as `ndims + index`. Parameters ---------- ndims: integer Number of dimensions in the output array. Must be greater than or equal to the number of dimensions in the input array. x: ndarray Input array. dims: ArrayLikeObject Dimension indices specifying where to place the dimensions of the input array. Must resolve to normalized indices arranged in ascending order. writable: boolean Boolean indicating whether a returned ndarray should be writable. This parameter only applies to ndarray constructors which support read-only instances. Returns ------- out: ndarray Output array. Examples -------- > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] ) > var sh = {{alias:@stdlib/ndarray/shape}}( x ) [ 2, 2 ] > var y = {{alias}}( 5, x, [ 1, 3 ], false ) > sh = {{alias:@stdlib/ndarray/shape}}( y ) [ 1, 2, 1, 2, 1 ] > var v = y.get( 0, 0, 0, 0, 0 ) 1 > v = y.get( 0, 0, 0, 1, 0 ) 2 > v = y.get( 0, 1, 0, 0, 0 ) 3 > v = y.get( 0, 1, 0, 1, 0 ) 4 See Also --------