Numpy expand_dims() method expands the shape of an array. The np expand_dims inserts a new axis that will appear at the axis position in the expanded array shape.
Python Numpy expand_dims() method expands the array by inserting a new axis at the specified position. This function requires two parameters.
np.expand_dims(arr, axis)
#numpy #python