9951 explained code solutions for 126 technologies


python-numpyHow to load Numpy matrix from CSV file


import numpy as np

db = np.loadtxt('/tmp/db.csv', delimiter=',')ctrl + c
import numpy as np

load Numpy module for Python

.loadtxt

load array from csv file

/tmp/db.csv

path to text csv that was previously saved with savetxt()

db

will contain loaded data