gett error message: "TypeError: 'int' object is not callable"
nleioatt at gmail.com
Thu Jul 9 09:42:06 EDT 2009
I've seen a lot of posts on this problem, but none seems to help.
Here is the code:
file = open(prefix1)
text = file.readlines()
len = len(text)
fields = text.split()
num_rows = int(fields)
num_cols = int(fields)
U1_matrix = 
for line in text[2: num_rows+2]:
fields = line.split()
# print "fields", fields, line
for i in range(len(fields)):
fields[i] = float(fields[i])
prefix is a space/line delimited ascii file that represents a 2D
matrix. i'm trying to read in 2 matrices from different files, strip
away the header stuff and then take the dot product of the 2
matrices. any help is much appreciated.
More information about the Python-list