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 cgoh...@uci.edu wrote: snip 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 @@

[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)

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]] print

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Emanuele Olivetti emanu...@relativita.com 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

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

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 emanu...@relativita.com 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)

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 p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti emanu...@relativita.com wrote: Interesting. Anyone able to reproduce what I observe? Emanuele Yes, I can reproduce this IndexError under Mac OS X: $ which

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

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 robert.k...@gmail.com wrote: On Fri, May 24, 2013 at 9:12 AM, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti emanu...@relativita.com wrote: Interesting. Anyone able to reproduce what I observe?

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 2:15 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, May 24, 2013 at 9:12 AM, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 1:59 PM, Emanuele Olivetti emanu...@relativita.com wrote:

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 warren.weckes...@gmail.com wrote: On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 2:15 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, May 24, 2013 at 9:12 AM, Peter Cock p.j.a.c...@googlemail.com wrote: On

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 2:47 PM, Warren Weckesser warren.weckes...@gmail.com wrote: Peter wrote: --- Successes --- 64 bit Linux: $ python2.6 Python

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

2013-05-24 Thread Warren Weckesser
On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 3:02 PM, Warren Weckesser warren.weckes...@gmail.com wrote: On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: Warren wrote: Two more data points: On Ubuntu 12.04, using 64 bit builds of Python 2.7.4 (from

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 warren.weckes...@gmail.com wrote: On 5/24/13, Peter Cock p.j.a.c...@googlemail.com wrote: On Fri, May 24, 2013 at 2:15 PM, Robert Kern robert.k...@gmail.com wrote: On Fri, May 24, 2013 at 9:12