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