We give a hyperpfaffian formulation of partition functions and ensemble averages for Hermitian and circular ensembles when L is an arbitrary integer and \beta=L^2 and when L is an odd integer and \beta=L^2 +1.