I have array of size (3, 3, 19, 19), which I applied flatten to get array of size 3249.
I had to write these values to file along with some other data, so I did following to get the array in string.
np.array2string(arr.flatten(), separator=', ', suppress_small=False)
However when I checked the content of the files after write,
I noticed that I have ,... , in the middle of the array as following
[ 0.09720755, -0.1221265 , 0.08671697, ..., 0.01460444, 0.02018792,
0.11455765]
How can I get string of array with all the elements, so I can potentially get all data to a file?
array2stringis used by the arrayprintto display a summary of the array. When it inserts...is determined by thethreshold. Are you sure you want/need that format? It includes[]which make parsing harder..tofilewrites a flat list of numbers without those.threshold=np.infinarray2string.