I have three arrays:
a = np.array([1,2,3])
b = np.array([4,5,6])
c = np.array([7,8])
I want to do something like this:
np.savetxt('data.txt',np.array(a,b,c))
or just
np.savetxt('data.txt',(a,b,c))
but I get
TypeError: float argument required, not numpy.ndarray
I've circumvented this issue by doing something like
np.savetxt('data.txt',np.array([a[0],a[1],...,c[2]]))
but this is not very satisfying (especially because the array sizes can change) and also plots all the values in a single column rather than a single row and multiple columns (how I want it).
The issue seems to be that the arrays are of different dimension. The kind of output I'd ideally like using the above example is:
1 2 3 4 5 6 7 8
Does anyone know a nicer way of doing this?