# Flatten a Matrix in Python using NumPy 
 # importing numpy as np
import numpy as np
  
# declare matrix with np
gfg = np.array([[2, 3], [4, 5]])
  
# using array.flatten() method
flat_gfg = gfg.flatten()
print(flat_gfg)