Advertisement
High_Light

paketi 2

Feb 28th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. import numpy
  2. a=numpy.ndarray(3,numpy.float)
  3. #print a
  4. b=numpy.array([1.2,0.2,-0.6])
  5. #print b
  6. #print type (a)
  7. #print type (b)
  8. #print a.shape
  9. c=numpy.array([1.3,2.0,1.4])
  10. d=c+b
  11. #print d
  12. #print d*10
  13.         e=b+c
  14. #print c+b==b+c
  15. #print (b+(c+d)) - ((b+c)+d)
  16. zero=numpy.array([0,0,0])
  17. #print zero.dtype
  18. #print zero+b==b
  19. x=numpy.array([1.2,2.3,3.4])
  20. x_=numpy.array([-1.2,-2.3,-3.4])
  21. #print x+x_
  22. #print 1*(3*x) == (1*3)*x
  23. #print (2.1+3.2)*x == (2.1*x)+(3.2*x)
  24. print numpy.linalg.norm(x)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement