Expand the shape of an array.
Insert a new axis that will appear at the axis position in the expanded
array shape.
- Parameters:
axis (int
or tuple
of ints
) – Position in the expanded axes where the new axis (or axes) is placed.
*args – Additional positional arguments forwarded to from_array.
**kwargs – Additional keyword arguments forwarded to from_array.
- Returns:
A buffer with the expanded shape.
- Return type:
BufferBase