rms() now works for arbitrary arrays