def METHOD_NAME():
    arr = np.array([[0, 1], [1, 0]])
    where = np.array([[False, True], [True, False]])
    result = arr.all(where=where)
    # Result should be np.bool_ True, since where mask isolates the non-zero elements
    assert result
    where = np.array([[True, False], [False, False]])
    result = arr.all(where=where, axis=1)
    assert_scalar_or_array_equal(result, numpy.array([False, True]))
    # Results should contain vacuous Trues in the relevant shape
    result = arr.all(where=False, axis=1)
    assert_scalar_or_array_equal(result, numpy.array([True, True]))
    result = arr.all(where=False, axis=0)
    assert_scalar_or_array_equal(result, numpy.array([True, True]))
    assert bool(arr.all(where=False, axis=None))
    where = np.array([[True, False], [False, True]])
    result = arr.any(where=where)
    # Result should be np.bool_ False, since mask isolates only zero elements
    assert not result
    where = np.array([[False, True], [False, False]])
    result = arr.any(where=where, axis=1)
    assert_scalar_or_array_equal(result, numpy.array([True, False]))
    # Results should contain vacuous Falses in the relevant shape
    result = arr.any(where=False, axis=1)
    assert_scalar_or_array_equal(result, numpy.array([False, False]))
    result = arr.any(where=False, axis=0)
    assert_scalar_or_array_equal(result, numpy.array([False, False]))
    assert not bool(arr.any(where=False, axis=None))