[SciPy-dev] NameError: global name 'asarray' is not defined

Travis Oliphant oliphant at ee.byu.edu
Thu Nov 7 11:49:41 EST 2002


> Hi,
>
> I would like to write an array to an ascii stream
>
> l = integrate.odeint(F0, l0[0], t)
> file=open("eigenpath.dat",'w')
> io.write_array(file,l)
>
> Traceback (most recent call last):
>   File "moody.py", line 87, in ?
>     io.write_array(file,l)
>   File
> "/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line
> 385, in write_array
>     arr = asarray(arr)
> NameError: global name 'asarray' is not defined
>

Fixed in CVS.  But, just go to the file
/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py and on the
line that says

from Numeric import XXXXX, XXXXX

add asarray at the end.


-Travis O.





More information about the SciPy-Dev mailing list