Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-02 Thread Christopher Jordan-Squire
On Fri, Sep 2, 2011 at 12:58 PM, Nathaniel Smith wrote: > On Fri, Sep 2, 2011 at 10:14 AM, Christopher Jordan-Squire > 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://githu

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-02 Thread Nathaniel Smith
On Fri, Sep 2, 2011 at 10:14 AM, Christopher Jordan-Squire 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 fro

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-02 Thread Christopher Jordan-Squire
On Thu, Sep 1, 2011 at 10:55 PM, Nathaniel Smith wrote: > On Thu, Sep 1, 2011 at 8:31 PM, Christopher Jordan-Squire > wrote: >> On Thu, Sep 1, 2011 at 11:14 PM, Robert Kern wrote: >>> On Thu, Sep 1, 2011 at 22:07, Christopher Jordan-Squire >>> wrote: >>> So in the mean time, are there any

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-02 Thread Christopher Jordan-Squire
I made the changes discussed here and pushed them to pull request. https://github.com/numpy/numpy/pull/143#issuecomment-1980897 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 an

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Nathaniel Smith
On Thu, Sep 1, 2011 at 8:31 PM, Christopher Jordan-Squire wrote: > On Thu, Sep 1, 2011 at 11:14 PM, Robert Kern wrote: >> On Thu, Sep 1, 2011 at 22:07, Christopher Jordan-Squire >> wrote: >> >>> So in the mean time, are there any suggestions for what this R sample >>> function should be called,

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Robert Kern
On Thu, Sep 1, 2011 at 22:31, Christopher Jordan-Squire wrote: > On Thu, Sep 1, 2011 at 11:14 PM, Robert Kern wrote: >> On Thu, Sep 1, 2011 at 22:07, Christopher Jordan-Squire >> wrote: >> >>> So in the mean time, are there any suggestions for what this R sample >>> function should be called, s

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Christopher Jordan-Squire
On Thu, Sep 1, 2011 at 11:14 PM, Robert Kern wrote: > On Thu, Sep 1, 2011 at 22:07, Christopher Jordan-Squire > wrote: > >> So in the mean time, are there any suggestions for what this R sample >> function should be called, since random.sample is apparently taken? > > If you default to size=1 (w

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Robert Kern
On Thu, Sep 1, 2011 at 22:07, Christopher Jordan-Squire wrote: > So in the mean time, are there any suggestions for what this R sample > function should be called, since random.sample is apparently taken? If you default to size=1 (which you probably should anyways), then np.random.choice() makes

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Christopher Jordan-Squire
On Thu, Sep 1, 2011 at 10:48 PM, Robert Kern wrote: > On Thu, Sep 1, 2011 at 21:39, Christopher Jordan-Squire > wrote: >> On Thu, Sep 1, 2011 at 10:01 PM,   wrote: > >>> First these functions would need to be deprecated. >> >> I discussed this with a few other people, and they suggested that it

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Robert Kern
On Thu, Sep 1, 2011 at 21:39, Christopher Jordan-Squire wrote: > On Thu, Sep 1, 2011 at 10:01 PM,   wrote: >> First these functions would need to be deprecated. > > I discussed this with a few other people, and they suggested that it > could be alright since it's for numpy 2.0 rather than numpy 1

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Christopher Jordan-Squire
On Thu, Sep 1, 2011 at 10:01 PM, wrote: > On Thu, Sep 1, 2011 at 6:02 PM, Christopher Jordan-Squire > wrote: >> Hi--I've just submitted a numpy 2.0 pull request for a function sample >> in np.random. It's essentially an implementation of R's sample >> function. It allows possibly non-uniform, po

Re: [Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread josef . pktd
On Thu, Sep 1, 2011 at 6:02 PM, Christopher Jordan-Squire wrote: > Hi--I've just submitted a numpy 2.0 pull request for a function sample > in np.random. It's essentially an implementation of R's sample > function. It allows possibly non-uniform, possibly without-replacement > sampling from a give

[Numpy-discussion] Pull Request Review: R-like sample function

2011-09-01 Thread Christopher Jordan-Squire
Hi--I've just submitted a numpy 2.0 pull request for a function sample in np.random. It's essentially an implementation of R's sample function. It allows possibly non-uniform, possibly without-replacement sampling from a given 1-D array-like. This is very useful for quickly and cleanly creating sam