[SciPy-dev] lognormal(): TypeError: Cannot convert float to numpy.ndarray

Robert Kern robert.kern at gmail.com
Mon Sep 11 17:32:55 CDT 2006


rex wrote:
>>>> import scipy as S
>>>> S.random.lognormal(0,1,4)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "mtrand.pyx", line 930, in mtrand.RandomState.lognormal
> TypeError: Cannot convert int to numpy.ndarray
> 
>>>> S.random.lognormal(0.,1.,7)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "mtrand.pyx", line 930, in mtrand.RandomState.lognormal
> TypeError: Cannot convert float to numpy.ndarray
> 
> 
> S.random.beta(), chisquare(), exponential(), f(), gamma(), and the
> others I tried returned without errors.
> 
> Scipy was built from a recent SVN, but I don't recall the checkout
> number.

Thank you. The problem is in numpy, not scipy, but I found the problem and fixed 
it in SVN r3141.

-- 
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 Scipy-dev mailing list