multinormal distribution

Robert Kern robert.kern at gmail.com
Fri Jul 7 14:38:05 EDT 2006


TG wrote:
> hi there.
> 
> I'm struggling with a function of numpy. Here it is :
> 
> import numpy as NP
> mean = NP.array([0,0])
> cov = NP.array([[1,0.25],[0.25,1]])
> v = NP.random.multivariate_normal(mean,cov)
> 
> Quite simple code : it is supposed to generate an array of two random
> values taken from a multinormal distribution, with respect to means and
> covariance matrix given as parameters.
> 
> What happens on my computer is simple : it freezes ! I can't even stop
> the process with ctrl-C in my python interpreter i have to kill it from
> outside.
> 
> I'm running : 
> - python 2.4.1
> - numpy 0.9.8

Well, it's working quite well for me on OS X PPC and Linux AMD-64 with a 
reasonably recent SVN checkout of numpy. Did you build numpy yourself, or use a 
binary distribution? Windows? Linux? OS X?

Please join us on the numpy mailing list with this information; hopefully there 
is someone there with a similar platform who can replicate your bug or offer 
better advice than myself.

   http://www.scipy.org/Mailing_Lists

In the meantime, you might try compiling a recent SVN checkout of numpy and see 
if the problem goes away for you.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list