[Numpy-discussion] Problems with RandomArray

Charles R Harris charlesr.harris at gmail.com
Sat Jul 7 13:53:22 EDT 2007


On 6/28/07, Alexander Dietz <Alexander.Dietz at astro.cf.ac.uk> wrote:
>
> Hi,
>
> I am not sure how to subscribe to this mailing list (there was no link for
> that, just this email adress), but hopefully someone will get this email and
> can me subscribe to this list, answer my question or ask someone else.
>
> Anyway, here is my question:
>
> I am using python with matplotlib version 0.90.1 and with numpy (as
> recommended), on a Linux box. So far matplotlib and numpy is working, but I
> need to use RandomArray! So, RandomArray can be found in the "Numerical
> Python" documentation and RandomArray.py can also be found within the
> "numeric" directory. If including this to my PYTHONPATH variable I can
> import RandomArray and also use some of the functions! But the function I am
> interested in is: multivariate_normal. When I try to use this function
> python stops responding, I have to kill python from outside!
> Is there a way to make this function work? Or maybe there is a quick
> workaround using functions in random and else? That would be really great!


RandomArray is not supported in numpy, use random instead.

In [55]: numpy.random.standard_normal((2,2))
Out[55]:
array([[ 0.29469565,  0.10410348],
       [-0.93587919,  1.19499785]])

In [56]: numpy.random.normal(0,1,(2,2))
Out[56]:
array([[ 1.0061501 ,  1.13688667],
       [-0.01728606, -1.72602317]])

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20070707/2ae60eb0/attachment.html>


More information about the NumPy-Discussion mailing list