Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Timer unit: 6.98413e-08 s
- Total time: 0.186524 s
- File: avgcol2.py
- Function: test_v5 at line 112
- Line # Hits Time Per Hit % Time Line Contents
- ==============================================================
- 112 @profile
- 113 def test_v5(frame, labels, stats):
- 114 4 369.0 92.2 0.0 flat_labels = labels.ravel()
- 115 4 154.0 38.5 0.0 c = stats[...,-1]
- 116 4 99829.0 24957.2 3.7 flat_green = frame[...,1].ravel()
- 117 4 1244370.0 311092.5 46.6 cn1 = np.bincount(flat_labels, flat_green)
- 118 4 104271.0 26067.8 3.9 flat_red = frame[...,2].ravel()
- 119 4 1219137.0 304784.2 45.6 cn2 = np.bincount(flat_labels, flat_red)
- 120 4 2227.0 556.8 0.1 measurements = (cn2-cn1)/c
- 121 4 327.0 81.8 0.0 return measurements[1:]
- Total time: 0.230549 s
- File: avgcol2.py
- Function: test_v9 at line 189
- Line # Hits Time Per Hit % Time Line Contents
- ==============================================================
- 189 @profile
- 190 def test_v9(frame, labels, stats):
- 191 global L
- 192 4 995086.0 248771.5 30.1 data = frame[...,1:].ravel()
- 193 4 2303369.0 575842.2 69.8 p = np.bincount(L,data)
- 194 4 2581.0 645.2 0.1 return (p[res+1:]-p[1:res])/stats[1:,-1]
- Total time: 0.234597 s
- File: avgcol2.py
- Function: test_v10 at line 198
- Line # Hits Time Per Hit % Time Line Contents
- ==============================================================
- 198 @profile
- 199 def test_v10(frame, labels, stats):
- 200 global L2
- 201 4 302.0 75.5 0.0 data = frame.ravel()
- 202 4 3356064.0 839016.0 99.9 p = np.bincount(L2,data)
- 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