Element-wise comparison operators ==, !=, >, <, >=, <= producing boolean arrays.
Comparison operators evaluate each element against a scalar or matching array, returning a boolean array of True/False values.
Comparing an array is like asking a question to every student in a classroom: each student holds up a True card or a False card.
Evaluating `arr > 30` creates an ndarray of dtype bool with identical shape.
is_greater = arr > 30if arr > 10: print('All greater') # ValueError: The truth value is ambiguousif (arr > 10).all(): print('All greater')An array of booleans cannot be evaluated by Python's `if`. Use `.all()` or `.any()`.
Solve the objective below using NumPy vectorized syntax
Create `arr = np.array([5, 15, 25])`, evaluate `arr >= 15`, and print the resulting boolean array.
[False True True]