expand_dims(x: ivy.NativeArray, axis: int, f: Optional[ivy.Framework] = None) → ivy.NativeArray¶
Expands the shape of an array. Inserts a new axis that will appear at the axis position in the expanded array shape.
x (array) – Input array.
axis (int) – Position in the expanded axes where the new axis is placed.
f (ml_framework, optional) – Machine learning framework. Inferred from inputs if None.
array with the number of dimensions increased by onearray