-Disclaimer, I'm new to Python
I'm trying to set a variable to have multiple requirements and I want the outcome to be a boolean value True only when every variable meets the requirements. Sorry if this doesn't make sense, I'm new to these terms. Here's my code:
group2 = (color > 1.9 and color < 5) & (mag2 > 23.2 and mag2 < 21.5)
and I'm getting this error:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
I'm not sure where to put the a.all(). Edit: color and mag2 are floats in numpy arrays.