Inserts an axis of size 1 at the specified position.
Arguments
- x
(
arrayish)
Input array.- axis
(
integer(1))
Position at which to insert the new axis. Valid positions range from 1 tonaxes(x) + 1. Negative values count from the end of the result, i.e.-1appends the new axis at the end.
Value
arrayish
Has the same data type as x with an extra axis of size 1.