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