mxnet.ndarray.expand_dims¶
-
mxnet.ndarray.
expand_dims
(data=None, axis=_Null, out=None, name=None, **kwargs)¶ Inserts a new axis of size 1 into the array shape
For example, given
x
with shape(2,3,4)
, thenexpand_dims(x, axis=1)
will return a new array with shape(2,1,3,4)
.Defined in src/operator/tensor/matrix_op.cc:L404
- Parameters
- Returns
out – The output of this function.
- Return type
NDArray or list of NDArrays