Fixed check for nesting level of colors array

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2019-09-16 12:10:16 +02:00
parent 4fc8bb6f8c
commit 5f7870b92f
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ def _draw_bboxes(instances: Sequence[np.ndarray], axis: pyplot.Axes,
if class_id == 0:
continue
if type(colors) is float:
if len(np.shape(colors)) == 1:
color = colors
else:
color = colors[class_id]