def sample_wr(lst):
    """
    Sample from lst, with replacement
    """
    arr = np.array(lst)
    indices = np.random.randint(len(lst), size=len(lst))
    sample = np.empty(arr.shape, dtype=arr.dtype)
    for i, ix in enumerate(indices):
        sample[i] = arr[ix]
    return list(sample)
Sample from lst, with replacement