Performs resampling on an array depending on the specified resampling method.

  • Parameters

    • arr: number[]

      The array

    • Optionalsamples: number

      The number of samples (optional, default is 100 for "bootstrap" and the length of the array for "jackknife")

    • Optionaltype: "bootstrap" | "jackknife" = "bootstrap"

      The type of resampling method, which can be "bootstrap" or "jackknife"

    Returns number[][]