ValueError: I/O operation on closed file

Feb. 20, 2003
5:52 a.m.
Hi all, I guess there is a bug in io.write_array. When I try to write an array to a file several times I get the following message Traceback (most recent call last): File "iotest.py", line 6, in ? io.write_array(file,A,separator=' ',linesep='\n', precision=5,suppress_small=1) File "/usr/local/lib/python2.1/site-packages/scipy/io/array_import.py", line 428, in write_array file.write(astr) ValueError: I/O operation on closed file from scipy import io from scipy import * file = open("test.dat",'w') A = array(([1.0,0.0],[0.0,1.0])) io.write_array(file,A,separator=' ',linesep='\n', precision=5,suppress_small=1) io.write_array(file,A,separator=' ',linesep='\n', precision=5,suppress_small=1) Any idea ? Nils
8042
Age (days ago)
8042
Last active (days ago)
0 comments
1 participants
participants (1)
-
Nils Wagner