@testing.for_all_dtypes_combination(names=['x_type', 'y_type'])
@testing.numpy_cupy_allclose(accept_error=TypeError)
def check_array_scalar_op(self, op, xp, x_type, y_type, swap=False):
    a = xp.array([[0, 1, 2], [1, 0, 2]], dtype=x_type)
    if swap:
        return op(y_type(2), a)
    else:
        return op(a, y_type(2))
@testing.for_all_dtypes_combination(names=['x_type', 'y_type'])
@testing.numpy_cupy_allclose(accept_error=TypeError)
def check_array_scalar_op(self, op, xp, x_type, y_type, swap=False):
    a = xp.array([[0, 1, 2], [1, 0, 2]], dtype=x_type)
    if swap:
        return op(y_type(2), a)
    else:
        return op(a, y_type(2))