I use
np.savetxt('file.txt', array, delimiter=',')
to save array to the file separated with comma. It looks like:
1, 2, 3
4, 5, 6
7, 8, 9
How can I save the array into the file shown as it is in the numpy format. In other words, it looks like:
[[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]