floats = np.array([0.1234, 0.5678, 0.9123])
ab = np.zeros(names.size, dtype=[('var1', 'S6'), ('var2', float)])
ab['var1'] = names
ab['var2'] = floats
np.savetxt('test.txt', ab, fmt='%10s %10.3f')
How to use python numpy.savetxt to write strings and float number to an ASCII file?