I am trying to convert the below to integers
I have a variable p which is the below
array([0.09641092, 0.02070604, 0.21679783, ..., 0.06453979, 0.02907993, 0.12129478])
I want to convert the numbers based on a threshold
thres = 0.5
then convert
p1 = np.int(p > thres)
but i get the below error
TypeError: only size-1 arrays can be converted to Python scalars