I am not quite sure why this isn´t working.. any explanation is highly appreciated. Mapping a function to np.array like:
test = np.array([0.6,0.7,1,0,0.5,0.2,0.4,0.3])
decision_boundary=0.6
decision_func = lambda x: 1. if (x >= decision_boundary) else 0.
decision_func(test)
results in the following value-error:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()