# Python array to txt or csv to latex [closed]

I'm new at Latex and I have a problem, I have an array in Python and I want to paste that array as a matrix in Latex in a simple way. In Python I have:

np.savetxt("matrix.csv", matrizfake, delimiter=' & ', fmt='%10.5f' ,newline=' \\\\\n')


That creates a csv file with the data of the matriz array. How the code should be, if I want to read that file, and print it as a matrix in Latex.

Thanks for your help, excuse my english.

• Hi, welcome. $\begin{matrix} \input{matrix.csv} \end{matrix}$? – Torbjørn T. Oct 23 '17 at 14:18
• I tried that at first, but I get the following error: ! Extra alignment tab has been changed to \cr. – Juan Manuel J Oct 23 '17 at 15:13
• Please prepare a full minimal example so that we can see what happens. It seems that \ is not printed or you have some short row. – Rmano Oct 23 '17 at 17:17
• Why didn't you say that you tried that then? You probably have more than 10 columns: tex.stackexchange.com/questions/3519 – Torbjørn T. Oct 23 '17 at 17:44