[SciPy-user] segfault in scipy.random.standard_normal
Robert Kern
robert.kern at gmail.com
Fri Dec 2 20:37:16 EST 2005
Chris Fonnesbeck wrote:
> Something is squirrely with the size argument in standard_normal:
>
> In [5]: random.standard_normal()
> Out[5]: 0.31727273308342824
>
> In [6]: random.standard_normal(2)
> Segmentation fault
>
> I'm using a recent svn build from scipy_core.
Try cleaning out all of the generated files and rebuilding. I do not see
this problem with the latest checkout (2 minutes ago). Nor do I see the
similar (probably identical) problem that Andrew Jaffe pointed out on
scipy-dev.
>>> from scipy import random
>>> random.standard_normal()
-0.27409875254644911
>>> random.standard_normal(1)
array([-1.56177532])
>>> random.standard_normal(2)
array([-0.31837658, -0.97301873])
>>> random.standard_normal(3)
array([-0.8761265 , -0.81597842, 0.23456039])
>>> random.standard_normal((3,4))
array([[-0.25311012, 0.64460605, -1.54209649, 1.2043136 ],
[-0.04572192, 1.78949021, -1.05508314, -1.38847567],
[ 0.52066447, 0.77373815, -0.00355181, -0.70754882]])
--
Robert Kern
robert.kern at gmail.com
"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
More information about the SciPy-User
mailing list