how to add a new dimension in numpy array code example Example: how to extend the dimension for array in numpy an_array = np.array([[0, 1],[2, 3]])