let rms a =
  Array.map ~f:(fun x -> x *. x) a |! mean |! sqrt