Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def setup(self):
- temp = []
- filename = open('num.txt', 'r')
- for line in filename: # goes through every line in the file
- row = line.strip() #strips the white space around it.
- temp.append(row) # adds it to the list
- for i in range(0, len(temp)): # for i in range(0, to the length of the list)
- self.data.append(temp[i].split()) # adds it to a new data set
- for i in self.data:
- matrix = Matrix([[float(i[0]), float(i[1])]])
- self.matrices.append(matrix)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement