Advertisement
Guest User

encoding loop

a guest
Aug 15th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. for row in csvReader:
  2.     counter += 1
  3.      
  4.     x_response = float(row[0])*100
  5.     y_response = float(row[1])*100 #row[1]
  6.            
  7.     this_point = [x_response,y_response]
  8.    
  9.     vector = np.array(this_point).astype(int)
  10.    
  11.     try:
  12.         last_point
  13.     except:
  14.         last_point = None
  15.  
  16.     radius = calculate_radius(last_point,this_point)    
  17.    
  18.     last_point = copy.deepcopy(this_point)    
  19.    
  20.     modelInput = {
  21.     "vector": (vector,radius)
  22.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement