Advertisement
Guest User

Untitled

a guest
Jul 5th, 2012
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. >>> import spam, numpy
  2. >>> a = spam.vector3d()
  3. >>> a[0]=1
  4. >>> a[1]=1
  5. >>> a[2]=1
  6. >>> b = numpy.array([1.2,2.3,4.5])
  7. >>> c = a+b
  8. >>> c
  9. array([ 2.2, 3.3, 5.5])
  10. >>> a+=a
  11. Traceback (most recent call last):
  12. File "<stdin>", line 1, in <module>
  13. TypeError: unsupported operand type(s) for +=: 'spam.vector3d' and 'spam.vector3d'
  14. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement