libb.random_sample

random_sample(arr, size=1)[source]

Random sample of N elements from numpy array.

Parameters:
  • arr (np.array) – Array to sample from.

  • size (int) – Number of elements to sample.

Returns:

Array of sampled elements.

Return type:

np.array