Advertisement
dan-masek

Untitled

Jan 3rd, 2020
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. Timer unit: 6.98413e-08 s
  2.  
  3. Total time: 0.186524 s
  4. File: avgcol2.py
  5. Function: test_v5 at line 112
  6.  
  7. Line # Hits Time Per Hit % Time Line Contents
  8. ==============================================================
  9. 112 @profile
  10. 113 def test_v5(frame, labels, stats):
  11. 114 4 369.0 92.2 0.0 flat_labels = labels.ravel()
  12. 115 4 154.0 38.5 0.0 c = stats[...,-1]
  13. 116 4 99829.0 24957.2 3.7 flat_green = frame[...,1].ravel()
  14. 117 4 1244370.0 311092.5 46.6 cn1 = np.bincount(flat_labels, flat_green)
  15. 118 4 104271.0 26067.8 3.9 flat_red = frame[...,2].ravel()
  16. 119 4 1219137.0 304784.2 45.6 cn2 = np.bincount(flat_labels, flat_red)
  17. 120 4 2227.0 556.8 0.1 measurements = (cn2-cn1)/c
  18. 121 4 327.0 81.8 0.0 return measurements[1:]
  19.  
  20. Total time: 0.230549 s
  21. File: avgcol2.py
  22. Function: test_v9 at line 189
  23.  
  24. Line # Hits Time Per Hit % Time Line Contents
  25. ==============================================================
  26. 189 @profile
  27. 190 def test_v9(frame, labels, stats):
  28. 191 global L
  29. 192 4 995086.0 248771.5 30.1 data = frame[...,1:].ravel()
  30. 193 4 2303369.0 575842.2 69.8 p = np.bincount(L,data)
  31. 194 4 2581.0 645.2 0.1 return (p[res+1:]-p[1:res])/stats[1:,-1]
  32.  
  33. Total time: 0.234597 s
  34. File: avgcol2.py
  35. Function: test_v10 at line 198
  36.  
  37. Line # Hits Time Per Hit % Time Line Contents
  38. ==============================================================
  39. 198 @profile
  40. 199 def test_v10(frame, labels, stats):
  41. 200 global L2
  42. 201 4 302.0 75.5 0.0 data = frame.ravel()
  43. 202 4 3356064.0 839016.0 99.9 p = np.bincount(L2,data)
  44. 203 4 2643.0 660.8 0.1 return (p[res*2+1:]-p[res+1:res*2])/stats[1:,-1]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement