Fix type error on boolean test if x or y is a numpy array.