reshape() (NumPy)

a.reshape() returns a new view of an array with a different shape but the same data and the same total number of elements. It rearranges how the existing…