+ 4
Numpy
How can i create an array using data from another file?
2 Answers
+ 4
If you have a file called data.txt with the lines:
1 2 3
4 5 6
7 8 9
You could read it in numpy as a matrix with:
matrix=numpy.loadtxt("data.txt")
With one line in data.txt you get an array:
1 2 3 4 5 6
returned types in both cases are numpy.ndarray
0
how can I solve 7 simultaneous equations