Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-26 Thread Charles R Harris
On Fri, May 24, 2013 at 1:09 PM, Christoph Gohlke wrote: > This patch works for me: > > diff --git a/numpy/random/mtrand/mtrand.pyx > b/numpy/random/mtrand/mtrand.pyx > index b0de560..233ff52 100644 > --- a/numpy/random/mtrand/mtrand.pyx > +++ b/numpy/random/mtrand/mtrand.pyx > @@ -4156,7 +4156

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Christoph Gohlke
On 5/24/2013 7:00 AM, josef.p...@gmail.com wrote: > On Fri, May 24, 2013 at 9:47 AM, Warren Weckesser > wrote: >> On 5/24/13, Peter Cock wrote: >>> On Fri, May 24, 2013 at 2:15 PM, Robert Kern wrote: On Fri, May 24, 2013 at 9:12 AM, Peter Cock wrote: > On Fri, May 24, 2013 at 1:59

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock wrote: > On Fri, May 24, 2013 at 3:02 PM, Warren Weckesser > wrote: >> On 5/24/13, Peter Cock wrote: >>>Warren wrote: Two more data points: On Ubuntu 12.04, using 64 bit builds of Python 2.7.4 (from Anaconda 1.5.0), and numpy built from source: numpy 1.6.1 g

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Peter Cock
On Fri, May 24, 2013 at 3:02 PM, Warren Weckesser wrote: > On 5/24/13, Peter Cock wrote: >>Warren wrote: >>> Two more data points: >>> On Ubuntu 12.04, using 64 bit builds of Python 2.7.4 (from Anaconda >>> 1.5.0), and numpy built from source: numpy 1.6.1 gives the error, but >>> 1.6.2 does not.

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Warren Weckesser wrote: > On 5/24/13, Peter Cock wrote: >> On Fri, May 24, 2013 at 2:47 PM, Warren Weckesser >> wrote: >>> >>>Peter wrote: --- Successes --- 64 bit Linux: >>>

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock wrote: > On Fri, May 24, 2013 at 2:47 PM, Warren Weckesser > wrote: >> >>Peter wrote: >>> --- >>> Successes >>> --- >>> >>> 64 bit Linux: >>> >>> $ python2.6 >>> Python 2.6.6 (r266:84292, Sep 11

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread josef . pktd
On Fri, May 24, 2013 at 9:47 AM, Warren Weckesser wrote: > On 5/24/13, Peter Cock wrote: >> On Fri, May 24, 2013 at 2:15 PM, Robert Kern wrote: >>> On Fri, May 24, 2013 at 9:12 AM, Peter Cock >>> wrote: On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti wrote: > Interesting. Anyo

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Peter Cock
On Fri, May 24, 2013 at 2:47 PM, Warren Weckesser wrote: > >Peter wrote: >> --- >> Successes >> --- >> >> 64 bit Linux: >> >> $ python2.6 >> Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23) >> [GCC 4.4.6 20120305 (Red

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock wrote: > On Fri, May 24, 2013 at 2:15 PM, Robert Kern wrote: >> On Fri, May 24, 2013 at 9:12 AM, Peter Cock >> wrote: >>> On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti >>> wrote: Interesting. Anyone able to reproduce what I observe? Emanuele >>> >>> >>

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Peter Cock
On Fri, May 24, 2013 at 2:15 PM, Robert Kern wrote: > On Fri, May 24, 2013 at 9:12 AM, Peter Cock wrote: >> On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti >> wrote: >>> Interesting. Anyone able to reproduce what I observe? >>> >>> Emanuele >> >> >> Yes, I can reproduce this IndexError under

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Daniele Nicolodi
On 24/05/2013 15:11, Daniele Nicolodi wrote: > Hello Emanuele, > > it works for me with numpy 1.6.2 (python 2.7.3 on mac os x 10.6 via > macports but is should not matter). 64-bit build Cheers, Daniele ___ NumPy-Discussion mailing list NumPy-Discussio

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Robert Kern
On Fri, May 24, 2013 at 9:12 AM, Peter Cock wrote: > On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti > wrote: >> Interesting. Anyone able to reproduce what I observe? >> >> Emanuele > > > Yes, I can reproduce this IndexError under Mac OS X: > > $ which python2.7 > /usr/bin/python2.7 > $ python

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Peter Cock
On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti wrote: > Interesting. Anyone able to reproduce what I observe? > > Emanuele Yes, I can reproduce this IndexError under Mac OS X: $ which python2.7 /usr/bin/python2.7 $ python2.7 Python 2.7.2 (default, Oct 11 2012, 20:14:37) [GCC 4.2.1 Compatibl

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Daniele Nicolodi
On 24/05/2013 14:02, Emanuele Olivetti wrote: > Hi, > > I'm using NumPy v1.6.1 shipped with Ubuntu 12.04 (Python 2.7.3). I observed an > odd behavior of the multivariate_normal function, which does not like int64 > for > the 'size' argument. > Short example: > """ > import numpy as np > print np.

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Warren Weckesser
On 5/24/13, Emanuele Olivetti wrote: > Interesting. Anyone able to reproduce what I observe? Yes. I'm also using Ubuntu 12.04. With numpy 1.6.1, I get the same error, but it works fine with numpy 1.7.1. Warren > > Emanuele > > On 05/24/2013 02:09 PM, Nicolas Rougier wrote: >> >> >> Works fo

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Emanuele Olivetti
Interesting. Anyone able to reproduce what I observe? Emanuele On 05/24/2013 02:09 PM, Nicolas Rougier wrote: > > > Works for me (numpy 1.7.1, osx 10.8.3): > import numpy as np print np.random.multivariate_normal(mean=np.zeros(2), cov=np.eye(2), size=1) > [[-0.55854737 -1.82631485

Re: [Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Nicolas Rougier
Works for me (numpy 1.7.1, osx 10.8.3): >>> import numpy as np >>> print np.random.multivariate_normal(mean=np.zeros(2), cov=np.eye(2), size=1) [[-0.55854737 -1.82631485]] >>> print np.random.multivariate_normal(mean=np.zeros(2), cov=np.eye(2), >>> size=np.int64(1)) [[ 0.40274243 -0.33922682]]

[Numpy-discussion] multivariate_normal issue with 'size' argument

2013-05-24 Thread Emanuele Olivetti
Hi, I'm using NumPy v1.6.1 shipped with Ubuntu 12.04 (Python 2.7.3). I observed an odd behavior of the multivariate_normal function, which does not like int64 for the 'size' argument. Short example: """ import numpy as np print np.random.multivariate_normal(mean=np.zeros(2), cov=np.eye(2), size=1)