I'm a kind of noob of TensorFlow and python. I need to save a large list of binary element, into a .data file. I have tried with numpy.savetxt but the problem is the delimitator. The list is in this format:
[[ 0. 0. 1. ... 0. 0. 40.]
[ 0. 0. 0. ... 0. 0. 40.]
[ 1. 0. 0. ... 0. 0. 40.]
...
[ 0. 0. 1. ... 0. 0. 40.]
[ 0. 0. 0. ... 0. 0. 40.]
[ 0. 0. 0. ... 0. 0. 37.]]
And every element of the list is in this format:
[ 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 1. 0. 0. 0. 0.
0. 0. 0. 0. 1. 0. 0. 1. 5. 0. 0. 0. 1. 0. 0. 0. 0. 21.
0. 0. 0. 0. 1. 0. 0. 0. 0. 0. 1. 0. 0. 40.]
How i can do this? If I use the "." or "," as a delimitator the result is terrible.
question from:
https://stackoverflow.com/questions/65940557/large-binary-list-in-a-data-file-in-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…