()
| 194 | |
| 195 | |
| 196 | def test_arg_max(): |
| 197 | mat = np.array([ |
| 198 | [ |
| 199 | [1, 2, 3], |
| 200 | [3, 2, 1], |
| 201 | [2, 3, 1] |
| 202 | ], |
| 203 | [ |
| 204 | [3, 3, 1], |
| 205 | [5, 4, 2], |
| 206 | [7, 2, 9] |
| 207 | ] |
| 208 | ]) |
| 209 | print(mat.shape) |
| 210 | mat_argmax = np.argmax(mat, axis=2) |
| 211 | print(mat_argmax) |
| 212 | mat_new = np.zeros((2, 3)) |
| 213 | print(mat_new) |
| 214 | mat_new[mat_argmax == 0] = 77 |
| 215 | print(mat_new) |
| 216 | |
| 217 | |
| 218 | def get_color(v, v_max): |
nothing calls this directly
no outgoing calls
no test coverage detected