Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Pavlyk, Oleksandr
Please see responses inline. From: NumPy-Discussion [mailto:numpy-discussion-boun...@scipy.org] On Behalf Of Todd Sent: Wednesday, October 26, 2016 4:04 PM To: Discussion of Numerical Python Subject: Re: [Numpy-discussion] Intel random number package On Wed, Oct 26,

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Todd
On Wed, Oct 26, 2016 at 4:30 PM, Pavlyk, Oleksandr < oleksandr.pav...@intel.com> wrote: > > The module under review, similarly to randomstate package, provides > alternative basic pseudo-random number generators (BRNGs), like MT2203, > MCG31, MRG32K3A, Wichmann-Hill. The scope of support differ,

Re: [Numpy-discussion] padding options for diff

2016-10-26 Thread Peter Creasey
> Date: Wed, 26 Oct 2016 16:18:05 -0400 > From: Matthew Harrigan > > Would it be preferable to have to_begin='first' as an option under the > existing kwarg to avoid overlapping? > >> if keep_left: >> if to_begin is None: >> to_begin = np.take(a, [0],

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Pavlyk, Oleksandr
Hi, Thanks a lot everybody for the feedback. The package can certainly be made a stand-alone drop-in replacement for np.random. There are many points raised and unraised in favor of this, and it is easy to accomplish. I will create a stand-alone package on github, but would still

Re: [Numpy-discussion] padding options for diff

2016-10-26 Thread Matthew Harrigan
Would it be preferable to have to_begin='first' as an option under the existing kwarg to avoid overlapping? On Wed, Oct 26, 2016 at 3:35 PM, Peter Creasey < p.e.creasey...@googlemail.com> wrote: > > Date: Wed, 26 Oct 2016 09:05:41 -0400 > > From: Matthew Harrigan > >

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread josef . pktd
On Wed, Oct 26, 2016 at 3:39 PM, Nathaniel Smith wrote: > On Wed, Oct 26, 2016 at 12:23 PM, Charles R Harris > wrote: > [...] > > What I have been concerned about are the follow combinations that > currently > > return floats > > > > num: , exp: , res:

Re: [Numpy-discussion] Combining covariance and correlation coefficient into one numpy.cov call

2016-10-26 Thread Mathew S. Madhavacheril
On Wed, Oct 26, 2016 at 3:20 PM, wrote: > > > On Wed, Oct 26, 2016 at 3:11 PM, Mathew S. Madhavacheril < > mathewsyr...@gmail.com> wrote: > >> >> >> On Wed, Oct 26, 2016 at 2:56 PM, Nathaniel Smith wrote: >> >>> On Wed, Oct 26, 2016 at 11:13 AM, Stephan

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Charles R Harris
On Wed, Oct 26, 2016 at 1:39 PM, wrote: > > > On Wed, Oct 26, 2016 at 3:23 PM, Charles R Harris < > charlesr.har...@gmail.com> wrote: > >> >> >> On Tue, Oct 25, 2016 at 10:14 AM, Stephan Hoyer wrote: >> >>> I am also concerned about adding more special

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Charles R Harris
On Wed, Oct 26, 2016 at 1:39 PM, Nathaniel Smith wrote: > On Wed, Oct 26, 2016 at 12:23 PM, Charles R Harris > wrote: > [...] > > What I have been concerned about are the follow combinations that > currently > > return floats > > > > num: , exp: , res:

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Nathaniel Smith
On Wed, Oct 26, 2016 at 12:41 PM, Warren Weckesser wrote: > > > On Wed, Oct 26, 2016 at 3:24 PM, Nathaniel Smith wrote: >> >> On Wed, Oct 26, 2016 at 9:10 AM, Julian Taylor >> wrote: >> > On 10/26/2016 06:00 PM, Julian

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Robert Kern
On Wed, Oct 26, 2016 at 12:41 PM, Warren Weckesser < warren.weckes...@gmail.com> wrote: > > On Wed, Oct 26, 2016 at 3:24 PM, Nathaniel Smith wrote: >> The patch also adds ~10,000 lines of code; here's an example of what >> some of it looks like: >> >>

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Charles R Harris
On Tue, Oct 25, 2016 at 10:14 AM, Stephan Hoyer wrote: > I am also concerned about adding more special cases for NumPy scalars vs > arrays. These cases are already confusing (e.g., making no distinction > between 0d arrays and scalars) and poorly documented. > > On Mon, Oct 24,

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Warren Weckesser
On Wed, Oct 26, 2016 at 3:24 PM, Nathaniel Smith wrote: > On Wed, Oct 26, 2016 at 9:10 AM, Julian Taylor > wrote: > > On 10/26/2016 06:00 PM, Julian Taylor wrote: > >> > >> On 10/26/2016 10:59 AM, Ralf Gommers wrote: > >>> > >>> > >>> > >>> On Wed,

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread Nathaniel Smith
On Wed, Oct 26, 2016 at 12:23 PM, Charles R Harris wrote: [...] > What I have been concerned about are the follow combinations that currently > return floats > > num: , exp: , res: 'numpy.float32'> > num: , exp: , res: 'numpy.float32'> > num: , exp: , res:

Re: [Numpy-discussion] Numpy integers to integer powers again again

2016-10-26 Thread josef . pktd
On Wed, Oct 26, 2016 at 3:23 PM, Charles R Harris wrote: > > > On Tue, Oct 25, 2016 at 10:14 AM, Stephan Hoyer wrote: > >> I am also concerned about adding more special cases for NumPy scalars vs >> arrays. These cases are already confusing (e.g.,

Re: [Numpy-discussion] padding options for diff

2016-10-26 Thread Peter Creasey
> Date: Wed, 26 Oct 2016 09:05:41 -0400 > From: Matthew Harrigan > > np.cumsum(np.diff(x, to_begin=x.take([0], axis=axis), axis=axis), axis=axis) > > That's certainly not going to win any beauty contests. The 1d case is > clean though: > > np.cumsum(np.diff(x,

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Nathaniel Smith
On Wed, Oct 26, 2016 at 9:10 AM, Julian Taylor wrote: > On 10/26/2016 06:00 PM, Julian Taylor wrote: >> >> On 10/26/2016 10:59 AM, Ralf Gommers wrote: >>> >>> >>> >>> On Wed, Oct 26, 2016 at 8:33 PM, Julian Taylor >>>

Re: [Numpy-discussion] Combining covariance and correlation coefficient into one numpy.cov call

2016-10-26 Thread Nathaniel Smith
On Wed, Oct 26, 2016 at 11:13 AM, Stephan Hoyer wrote: > On Wed, Oct 26, 2016 at 11:03 AM, Mathew S. Madhavacheril > wrote: >> >> On Wed, Oct 26, 2016 at 1:46 PM, Stephan Hoyer wrote: >>> >>> I wonder if the goals of this addition

Re: [Numpy-discussion] Combining covariance and correlation coefficient into one numpy.cov call

2016-10-26 Thread Stephan Hoyer
On Wed, Oct 26, 2016 at 11:03 AM, Mathew S. Madhavacheril < mathewsyr...@gmail.com> wrote: > On Wed, Oct 26, 2016 at 1:46 PM, Stephan Hoyer wrote: > >> I wonder if the goals of this addition could be achieved by simply adding >> an optional `cov` argument >> > to np.corr, which

Re: [Numpy-discussion] Combining covariance and correlation coefficient into one numpy.cov call

2016-10-26 Thread Mathew S. Madhavacheril
On Wed, Oct 26, 2016 at 1:46 PM, Stephan Hoyer wrote: > I wonder if the goals of this addition could be achieved by simply adding > an optional `cov` argument > to np.corr, which would provide a pre-computed covariance. > That's a fair suggestion which I'm happy to switch to.

Re: [Numpy-discussion] Combining covariance and correlation coefficient into one numpy.cov call

2016-10-26 Thread Stephan Hoyer
I wonder if the goals of this addition could be achieved by simply adding an optional `cov` argument to np.corr, which would provide a pre-computed covariance. Either way, `covcorr` feels like a helper function that could exist in user code rather than numpy proper. On Wed, Oct 26, 2016 at 10:27

[Numpy-discussion] Combining covariance and correlation coefficient into one numpy.cov call

2016-10-26 Thread Mathew S. Madhavacheril
Hi all, I posted a pull request: https://github.com/numpy/numpy/pull/8211 which adds a function `numpy.covcorr` that calculates both the covariance matrix and correlation coefficient with a single call to `numpy.cov` (which is often an expensive call for large data-sets). A function

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Robert Kern
On Wed, Oct 26, 2016 at 9:36 AM, Sebastian Berg wrote: > > On Mi, 2016-10-26 at 09:29 -0700, Robert Kern wrote: > > On Wed, Oct 26, 2016 at 9:10 AM, Julian Taylor > mail.com> wrote: > > > > > > On 10/26/2016 06:00 PM, Julian Taylor wrote: > > >

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Sebastian Berg
On Mi, 2016-10-26 at 09:29 -0700, Robert Kern wrote: > On Wed, Oct 26, 2016 at 9:10 AM, Julian Taylor mail.com> wrote: > > > > On 10/26/2016 06:00 PM, Julian Taylor wrote: > > >> I prefer for the full functionality of numpy to stay available > with a > >> stack of

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Robert Kern
On Wed, Oct 26, 2016 at 9:10 AM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote: > > On 10/26/2016 06:00 PM, Julian Taylor wrote: >> I prefer for the full functionality of numpy to stay available with a >> stack of community owned software, even if it may be less powerful that >> way. > >

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Julian Taylor
On 10/26/2016 06:00 PM, Julian Taylor wrote: On 10/26/2016 10:59 AM, Ralf Gommers wrote: On Wed, Oct 26, 2016 at 8:33 PM, Julian Taylor > wrote: On 26.10.2016 06:34, Charles R Harris wrote: > Hi All, > >

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Julian Taylor
On 10/26/2016 10:59 AM, Ralf Gommers wrote: On Wed, Oct 26, 2016 at 8:33 PM, Julian Taylor > wrote: On 26.10.2016 06:34, Charles R Harris wrote: > Hi All, > > There is a proposed random number package PR now

Re: [Numpy-discussion] padding options for diff

2016-10-26 Thread Matthew Harrigan
The inverse of cumsum is actually a little more unweildy since you can't drop a dimension with take. This returns the original array (numerical caveats aside): np.cumsum(np.diff(x, to_begin=x.take([0], axis=axis), axis=axis), axis=axis) That's certainly not going to win any beauty contests.

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Ralf Gommers
On Wed, Oct 26, 2016 at 8:33 PM, Julian Taylor < jtaylor.deb...@googlemail.com> wrote: > On 26.10.2016 06:34, Charles R Harris wrote: > > Hi All, > > > > There is a proposed random number package PR now up on github: > > https://github.com/numpy/numpy/pull/8209. It is from > > oleksandr-pavlyk

Re: [Numpy-discussion] Intel random number package

2016-10-26 Thread Julian Taylor
On 26.10.2016 06:34, Charles R Harris wrote: > Hi All, > > There is a proposed random number package PR now up on github: > https://github.com/numpy/numpy/pull/8209. It is from > oleksandr-pavlyk and implements > the number random number package using MKL for