File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1762,7 +1762,7 @@ module Make
17621762 if dups then sample else
17631763 let prev = Hashtbl. create max_size in
17641764 let rec sample_new steps =
1765- if steps = 0 then invalid_arg " sample_array " else
1765+ if steps = 0 then sample () else
17661766 let s = sample () in
17671767 try Hashtbl. find prev s ; sample_new (steps - 1 )
17681768 with Not_found -> Hashtbl. add prev s () ; s in
Original file line number Diff line number Diff line change @@ -466,7 +466,9 @@ module type S = sig
466466 sorted.
467467
468468 If [~dups:false] ([true] by default), all elements of generated
469- array are unique.*)
469+ arrays are unique, or at least try hard to be in a reasonable time:
470+ if the codomain of [sampler] is too small there might still be
471+ duplicates.*)
470472 val sample_array :
471473 ?min_size : int -> ?max_size : int -> ?dups : bool -> ?sorted : bool
472474 -> 'a sampler
You can’t perform that action at this time.
0 commit comments