fix #5823, mean() over dimension of integer arrays