Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> import spam, numpy
- >>> a = spam.vector3d()
- >>> a[0]=1
- >>> a[1]=1
- >>> a[2]=1
- >>> b = numpy.array([1.2,2.3,4.5])
- >>> c = a+b
- >>> c
- array([ 2.2, 3.3, 5.5])
- >>> a+=a
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: unsupported operand type(s) for +=: 'spam.vector3d' and 'spam.vector3d'
- >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement