print('z= ' + str(encoded_imgs))
f = open("test.txt",'w')
f.write(str(encoded_imgs))
f.close
I would like to save the array as text using this grammar.
However, because there are too many contents of the array, it is saved as follows in the text.
[[ 9.814232 2.3858259 1.1962464 ... 3.4777994 3.8491027
7.6847544 ]
It is omitted as ...
in the middle, so is there a way to store all the elements without omission?
If encoded_imgs is a numpy array, change it to list or
You can add np.set_printoptions(threshold=np.inf)
to the code.
© 2024 OneMinuteCode. All rights reserved.