Error: tuple index out of range
I/P
dims = np.shape(df)
print(dims)
O/P
(142, 3)

I/P
pixel_matrix = np.reshape(df, (dims[0]* dims[1], dims[2]))
print(np.shape(pixel_matrix))
O/P
IndexError                                Traceback (most recent call last)
<ipython-input-71-0f88d37eb802> in <module>
----> 1 pixel_matrix = np.reshape(df, (dims[0]* dims[1], dims[2]))
      2 print(np.shape(pixel_matrix))

IndexError: tuple index out of range


How to solve this error? 
