tronds

Array-math

Sep 20th, 2012
294
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. #-------------------------------------------------------------------------------
  2. # Name: Physics subtract
  3. # Purpose: Subtract an array by a value
  4. #
  5. # Author: Tronds
  6. #
  7. # Created: 20.09.2012
  8. # Copyright: (c) Tronds 2012
  9. # Licence: <your licence>
  10. #-------------------------------------------------------------------------------
  11. #!/usr/bin/env python
  12. import numpy
  13.  
  14. t0 = float() #define your t0 value in between the brackets.
  15.  
  16. #Enter the desired values of t that you want subtracted by t0.
  17. #Remember to separate the values with a comma.
  18. #I.e rawdata = [1.4063,1.5060,1.6057,1.7054]
  19. rawdata = []
  20.  
  21. array = numpy.array(rawdata)
  22. array = array - t0
  23. print array
  24. print "Job done"
Advertisement
Comments
  • Comment was deleted
Add Comment
Please, Sign In to add comment