On Sat, Jun 9, 2012 at 2:12 PM, bob tnur <bobtnu...@gmail.com> wrote: >> >> how to save multiple files like cm1.txt,cm2.txt,cm3.txt etc and to >> produce their corresponding outputs cm1.out,cm2.out,cm3.out etc. > > or how to modify this: > np.savetxt(fname, (a,b), fmt='%4.8f') >
You can save them to separate files with a for loop. for i, arr in enumerate([a, b]): fname = 'cm{}.out'.format(i + 1) np.savetxt(fname, arr, fmt='%4.8f') _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion