import numpy as np
x = np.array([[1,2,3],[4,5,6],[1,2,3]])
x.flatten()
x.ravel()
x.flatten('F')
x.flatten()[1] = 20
x
x.ravel()[1] = 20
x
x.reshape(1,-1)
array([[ 1, 20, 3, 4, 5, 6, 1, 2, 3]])
x = np.array([[1,2,3],[2,3,4]])
np.prod(x)
np.prod(x,axis=1)
np.prod(x,axis=0)