I have a python list
temp = [['abc.jpg', 1, 2, 3, 'xyz'], ['def.jpg', 4,5,6, 'xyz']]
To save it as an array, so I do this:
temp = np.vstack(temp)
Result:
print(temp)
temp = [['abc.jpg', '1', '2', '3', 'xyz'], ['def.jpg', '4','5','6', 'xyz']]
It is converting the integers to string. I dont want that to happen.
I want to save the result in a text file.
I tried the following:
np.savetxt("data.txt", temp)
But I get the following error:
TypeError: Mismatch between array dtype ('<U8') and format specifier ('%.18e %.18e %.18e %.18e %.18e %.18e')