Numpy | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 4

Numpy

How can i create an array using data from another file?

10th Apr 2019, 9:14 PM
Ahshshshshshsh
Ahshshshshshsh - avatar
2 ответов
+ 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
10th Apr 2019, 10:53 PM
Javier Felipe Toribio
Javier Felipe Toribio - avatar
0
how can I solve 7 simultaneous equations
12th Apr 2019, 12:18 AM
emceejay