Advertisement
Peaser

average vectors out

Jul 31st, 2014
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. def avAll(object):
  2.     """LIST OF TUPLES"""
  3.     a,b,c=[],[],[]
  4.  
  5.     a.append([i[0] for i in object])
  6.     b.append([i[1] for i in object])
  7.     c.append([i[2] for i in object])
  8.  
  9.     a = [sum(i)/len(i) for i in a]
  10.     b = [sum(i)/len(i) for i in b]
  11.     c = [sum(i)/len(i) for i in c]
  12.  
  13.     return (a,b,c)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement