Say I have the following numpy structured array:
>>> a = numpy.array((1, 2.0, \'buckle_my_shoe\'),dtype=(\'i4,f8,a14\'))
array((1, 2.0, \'buckle_my
Edit: For whatever reason I can't seem to be able to leave this answer alone, so here's a cleaner version that doesn't use the csv module unnecessarily. For the record, @askewchan's answer is still better!
a = numpy.array([(1, 2.0, 'buckle_my_shoe'),
(3,4.0,'lock_the_door')],dtype=('i4,f8,a14'))
with open('test.txt','w') as f:
f.write(' '.join([str(item) for sublist in a for item in sublist]))
print open('test.txt','r').read()
Output:
1 2.0 buckle_my_shoe 3 4.0 lock_the_door