@testing.for_all_dtypes(no_bool=True)
def check_typecast(self, val, dtype):
    operators = [operator.add, operator.sub, operator.mul, operator.truediv]
    for op in operators:
        with numpy.errstate(divide='ignore', invalid='ignore'):
            a = op(val, (testing.shaped_arange((5,), numpy, dtype) - 2))
        b = op(val, (testing.shaped_arange((5,), cupy, dtype) - 2))
        assert (a.dtype == b.dtype)
@testing.for_all_dtypes(no_bool=True)
def check_typecast(self, val, dtype):
    operators = [operator.add, operator.sub, operator.mul, operator.truediv]
    for op in operators:
        with numpy.errstate(divide='ignore', invalid='ignore'):
            a = op(val, (testing.shaped_arange((5,), numpy, dtype) - 2))
        b = op(val, (testing.shaped_arange((5,), cupy, dtype) - 2))
        assert (a.dtype == b.dtype)