0

I am sorry if this looks easy but I can't find the meaning of this online.

Below is the original code line in the Non-max suppression function for yoloV5 in general.py: xc = prediction[..., 4] > conf_thres #candidates

  • In *Python*, it's just syntax for `prediction.__getitem__((..., 4))`. What that means to `prediction.__getitem__` is entirely dependent on the type of `prediction`. – chepner Sep 06 '22 at 13:29
  • Is `prediction` a 2D array perhaps? – Panagiotis Kanavos Sep 06 '22 at 13:29
  • [What does "three dots" in Python mean when indexing what looks like a number?](https://stackoverflow.com/q/42190783) – 001 Sep 06 '22 at 13:29

1 Answers1

0

I have understood it now. Below is a code snippet

import numpy as np
n = np.random.randint(9, size=(5,6))
print(n)
check =5
a = n[...,4]>check 

print(a)

Output for above code is :

[[1 2 2 2 4 3]
 [1 5 4 8 2 0]
 [6 6 3 0 7 6]
 [4 2 5 1 3 1]
 [3 5 2 6 4 2]]
[False False  True False False]