I have this type of list named "preds":
[False True False True True True True True True True True True
True False False True True True True False True True False True
False False True False True True True True True False False False
False True False False True True True True False False False False
True False True False True True True True True False True False
True]
It's the prediction i obtained with the logistic regression model. I need to convert it into an array containing 1 if the element in the list is "True" and 0 if the element is "False". I have already tried using np.array(preds) or np.asarray(preds) but it doesn't work.
Please can somebody help me finding a solution? I am sorry for the stupid question but I am very new to programming. Thanks in advance.
I already tried using the command of the numpy library like np.array(preds) or np.asarray(preds). I need to obtain a new vector with the same number of elements, in which 1 corresponds to True and 0 corresponds to False