On Sat, Jul 16, 2022 at 8:18 PM Tom Lane <t...@sss.pgh.pa.us> wrote:

> Martin Kalcher <martin.kalc...@aboutsource.net> writes:
>
> > - I added a second function sample(), because it is a lot faster to take
> >    some elements from an array than to shuffle the whole array and
> >    slice it. This function can be removed if it is not wanted.
>
> I have no opinion about whether this one is valuable enough to include in
> intarray, but I do feel like sample() is a vague name, and easily confused
> with marginally-related operations like TABLESAMPLE.  Can we think of a
> more on-point name?  Something like "random_subset" would be pretty
> clear, but it's also clunky.  It's too late here for me to think of
> le mot juste...
>
>
choose(input anyarray, size integer, with_replacement boolean default
false, algorithm text default 'default')?

David J.

Reply via email to