MCPcopy Create free account
hub / github.com/AutonomousVehicleLaboratory/SemVecNet / test_arg_max

Function test_arg_max

semantic_mapping/src/utils/utils.py:196–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194
195
196def 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
218def get_color(v, v_max):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected