Advertisement
Guest User

Untitled

a guest
Jul 6th, 2012
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Python 2.7.3 (default, Apr 20 2012, 22:39:59)
  2. [GCC 4.6.3] on linux2
  3. Type "help", "copyright", "credits" or "license" for more information.
  4. >>> import spam, numpy
  5. >>> a = spam.vector3d()
  6. >>> a[0]=1
  7. >>> a[1]=2
  8. >>> a[2]=3
  9. >>> b = numpy.array(a, copy=False)
  10. >>> b
  11. array([ 1., 2., 3.])
  12. >>> a[0]=-1
  13. >>> b
  14. array([-1., 2., 3.])
  15. >>>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement