Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23131

python - saving vector-array data with different lengths at columns of a txt file

$
0
0

I have two sets of data as

A=[array([1,2,3]),array([1,2,3,4]), ... array([11,13,2,1,5,7,9,0])]B=[array([11,21,31]),array([16,27,38,48]), ... array([114,134,24,14,54,74,94,04])]

I want to save the arrays as consecutive x-y columns in a txt file such as:enter image description herein which the columns of A and B data are consequantly written.

However, because of different lenghts, I can not apply the command:np.savetxt(np.transpose(A).Any help is appreciated.

I tried using np.savetxt(np.transpose) but here the columns have different lengths and this command fails.


Viewing all articles
Browse latest Browse all 23131

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>