Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.17 KB | None | 0 0
  1. if len(self) != len(other):
  2. raise ValueError('Length should match')
  3. result = Vector(len(self))
  4. for j in range(len(self)):
  5. result[j] = self[j] + other[j]
  6. return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement