Re: Writing 2d array in an ascci file

2006-09-28 Thread Jeremy Sanders
[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.cl

Writing 2d array in an ascci file

2006-09-28 Thread [EMAIL PROTECTED]
Hi, 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. Thanks, CH. -- http://mail.python.org/mailman/listinfo/python-list