def func1():
    a = np.zeros((3000, 300), dtype=np.float32)
with open('junk.txt') as f:
    for i, line in enumerate(f):
        a[(i), :] = line.split()

def func2():
    a = np.zeros((3000, 300), dtype=np.float32)
with open('junk.txt') as f:
    for i, line in enumerate(f):
        a[(i), :] = map(np.float32, line.split())
Convert a string list to float32 efficiently