view of numpy ndarray.flatten() with sharing memoryr = a.ravel() r[0] = 99 print(a) # [[99,2], [3,4]]