Calculates the mean of an array.

  • Parameters

    • arr: number[]

      The array

    • Optionaltype: "arithmetic" | "geometric" | "harmonic" = "arithmetic"

      The type of mean, which can be "arithmetic", "geometric", or "harmonic"

    Returns number