{{alias}}( x, dim, writable ) Expands the shape of an array by inserting a new dimension of size one at a specified dimension index. A provided dimension index must reside on the interval `[-N-1, N]`, where `N` is the rank (i.e., number of dimensions) of the provided input array. If provided a negative dimension index, the position at which to insert a singleton dimension is computed as `N + dim + 1`. Hence, if provided `-1`, the resolved position is `N` (i.e., a singleton dimension is appended to the input array). The `writable` parameter only applies to ndarray constructors supporting read-only instances. Parameters ---------- x: ndarray Input array. dim: integer Dimension index at which to insert a singleton dimension. writable: boolean Boolean indicating whether the returned ndarray should be writable. Returns ------- out: ndarray Output array. Examples -------- > var x = {{alias:@stdlib/ndarray/array}}( [ [ 1, 2 ], [ 3, 4 ] ] ) [ [ 1, 2 ], [ 3, 4 ] ] > var y = {{alias}}( x, 1, false ) [ [ [ 1, 2 ] ], [ [ 3, 4 ] ] ] See Also --------