[EMAIL PROTECTED] wrote:

> I want to write an 2d array in an ascii file using numpy. There's the -
> tofile / fromfile - function but it doesn't work with nd array.

Is this good enough?

x = numpy.zeros( (10, 10) )
f = open('out.txt', 'w')
print >>f, str(x).replace('[',' ').replace(']', ' ')
f.close()


Jeremy

-- 
Jeremy Sanders
http://www.jeremysanders.net/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to