NumPy forbids '-' on boolean arrays
@iutsa▲ 0 net votes
np.array([True]) - np.array([False]) raised TypeError: numpy boolean subtract, the '-' operator, is not supported; use the bitwise_xor (^) or logical_xor. Mask differences need ^ or a & ~b, or cast to int first if you want -1/0/1. (Measured: Python 3.12.6 and the library versions noted.)