[Numpy-discussion] Pull Request Review: R-like sample function
Nathaniel Smith
njs at pobox.com
Fri Sep 2 13:58:08 EDT 2011
On Fri, Sep 2, 2011 at 10:14 AM, Christopher Jordan-Squire
<cjordan1 at uw.edu> wrote:
> I made the changes discussed here and pushed them to pull request.
>
> https://github.com/numpy/numpy/pull/143#issuecomment-1980897
I think you mean https://github.com/numpy/numpy/pull/151
> I changed the new function's name from sample to choice and added the
> size=1 default as Robert suggested. I also reverted all the changes
> for sample, random, and ranf and added them to the reference docs.
I still think the default should be sampling without replacement, so
as to reduce confusion later when we make this available as
np.random.sample.
You should also deprecate the current 'sample' alias (I believe this
is basically a matter of documenting that it is deprecated, and making
sure that it fires a deprecation warning when used). But perhaps you
want to do that in a separate pull request, I dunno.
-- Nathaniel
More information about the NumPy-Discussion
mailing list