>>> import numpy as np
>>> x = np.array([[1 , 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12]])
>>> x
array([[ 1, 2, 3, 4],
[ 5, 6, 7, 8],
[ 9, 10, 11, 12]])
>>> y1=x.flatten()
>>> y1
array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
>>> y1[2]=100
>>> y1
array([ 1, 2, 100, 4, 5, 6, 7, 8, 9, 10, 11, 12])
>>> x
array([[ 1, 2, 3, 4],
[ 5, 6, 7, 8],
[ 9, 10, 11, 12]])
>>> y2=x.ravel()
>>> y2
array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12])
>>> y2[2]=200
>>> y2
array([ 1, 2, 200, 4, 5, 6, 7, 8, 9, 10, 11, 12])
>>> x
array([[ 1, 2, 200, 4],
[ 5, 6, 7, 8],
[ 9, 10, 11, 12]])