Iterate over matrices in numpy,np.array(list(g))