def getF_GMM on 3D arrays