def getNewMeans on 3D arrays