Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import csv
- import numpy as np
- def read_csv(fileName):
- with open(fileName) as data:
- xy = csv.reader(data, delimiter=',')
- dim = sum(1 for cc in xy)
- x = np.zeros(dim)
- y = np.zeros(dim)
- data.seek(0)
- count = 0
- for row in xy:
- x[count] = row[0]
- y[count] = row[1]
- count = count + 1
- return x,y,count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement