I need to read this CSV to an array of floats. I'm new to python and unsure how to convert because when I read in the CSV it says that I am using type "Dictreader" hence why I am trying to convert. Thanks!
[Screenshot of where I'm at][1]
import csv
with open('NP.csv') as csvfile:
NP = csv.DictReader(csvfile)
with open('A.csv') as csvfule:
A = csv.DictReader(csvfile)
[r, c] = size(NP);
[r2, c2] = size(A);
for i in range(0, r):
for j in range(0, c):
NP(i,j) = float(NP(i,j));
for i in range(0, r2):
for j in range(0, c2):
A(i,j) = float(A(i,j));
read_csvmight be exactly what you want.NP.csvand/orA.csv?size()to your code.