   self.check(kernel, a, b, options={'neighborhood': ((-6, -3), (2, 9),)})

    def test_basic79(self):
        """ neighborhood, two incompatible args """
        def kernel(a, b):
            cumul = 0
            for i in range(-3, 1):
                for j in range(-3, 1):
                    cumul += a[i, j] + b[i, j]
            return cumul / (9.)
        a = np.arange(10. * 20.).reshape(10, 20)
        b = np.arange(10. * 20.).reshape(10, 10, 2)
        ex = self.exception_dict(
            pyStencil=ValueError,
            stencil=TypingError,
            parfor=TypingError,
            njit=TypingError)
        self.check(
            kernel, a, b, options={
                'neighborhood': (
                    (-3, 0), (-3, 0),)}, expected_exception=ex)

    def test_basic80(self):
        """ neighborhood, type change """
        def kernel(a, b):
            cumul = 0
            for i in range(-3, 1):
                for j in range(-3, 1):
                    cumul += a[i, j] + b
            return cumul / (9.)
        a = np.arange(10. * 20.).reshape(10, 20)
        b = 12.j
        self.check(kernel, a, b, options={'neighborhood': ((-3, 0), (-3, 0))})

    def test_basic81(self):
        """ neighborhood, dimensionally incompatible arrays """
        def kernel(a, b):
            cumul = 0
            for i in range(-3, 1):
                for j in range(-3, 1):
                    cumul += a[i, j] + b[i]
            return cumul / (9.)
        a = np.arange(10. * 20.).reshape(10, 20)
        b = a[0].copy()
        ex = self.exception_dict(
            pyStencil=ValueError,
            stencil=TypingError,
            parfor=AssertionError,
            njit=TypingError)
        self.check(
            kernel, a, b, options={
                'neighborhood': (
                    (-3, 0), (-3, 0))}, expected_exception=ex)

    def test_basic82(self):
        """ neighborhood, with standard_indexing"""
        def kernel(a, b):
            cumul = 0
            for i in range(-3, 1):
                for j in range(-3, 1):
                    cumul += a[i, j] + b[1, 3]
            return cumul / (9.)
        a = np.arange(10. * 20.).reshape(10, 20)
        b = a.copy()
        self.check(
            kernel, a, b, options={
                'neighborhood': (
                    (-3, 0), (-3, 0)), 'standard_indexing': 'b'})

    def test_basic83(self):
        """ neighborhood, with standard_indexing and cval"""
        def kernel(a, b):
            cumul = 0
            for i in range(-3, 1):
                for j in range(-3, 1):
                    cumul += a[i, j] + b[1, 3]
            return cumul / (9.)
        a = np.arange(10. * 20.).reshape(10, 20)
        b = a.copy()
        self.check(
            kernel, a, b, options={
                'neighborhood': (
                    (-3, 0), (-3, 0)), 'standard_indexing': 'b', 'cval': 1.5})

    def test_basic84(self):
        """ kernel calls njit """
        def kernel(a):
            return a[0, 0] + addone_njit(a[0, 1])

        a = np.arange(10. * 20.).reshape(10, 20)
        self.check(kernel, a)

    def test_basic85(self):
        """ kernel calls njit(parallel=True)"""
        def kernel(a):
            return a[0, 0] + addone_pjit(a[0, 1])

        a = np.arange(10. * 20.).reshape(10, 20)
        self.check(kernel, a)

    # njit/parfors fail correctly, but the error message isn't very informative
    def test_basic86(self):
        """ bad kwarg """
        def kernel(a):
            return a[0, 0]

        a = np.arange(10. * 20.).reshape(10, 20)
        self.check(kernel, a, options={'bad': 10},
                   expected_exception=[ValueError, TypingError])

    def test_basic87(self):
        """ reserved arg name in use """
        def kernel(__sentinel__):
            return __sentinel__[0, 0]

        a = np.arange(10. * 20.).reshape(10, 20)
        self.check(kernel, a)

    def test_basic88(self):
        """ use of reserved word """
        def kernel(a, out):
            return out * a[0, 1]
        a = np.arange(12.).reshape(3, 4)
        ex = self.exception_dict(
            pyStencil=ValueError,
            stencil=ValueError,
            parfor=ValueError,
            njit=LoweringError)
        self.check(
            kernel,
            a,
            1.0,
            options={},
            expected_exception=ex)

    def test_basic89(self):
        """ basic multiple return"""
        def kernel(a):
            if a[0, 1] > 10:
                return 10.
            elif a[0, 3] < 8:
                return a[0, 0]
            else:
                return 7.

        a = np.arange(10. * 20.).reshape(10, 20)
        self.check(kernel, a)

    def test_basic90(self):
        """ neighborhood, with standard_indexing and cval, multiple returns"""
        def kernel(a, b):
            cumul = 0
            for i in range(-3, 1):
                for j in range(-3, 1):
                    cumul += a[i, j] + b[1, 3]
            res = cumul / (9.)
            if res > 200.0:
                return res + 1.0
            else:
                return res
        a = np.arange(10. * 20.).reshape(10, 20)
        b = a.copy()
        self.check(
            kernel, a, b, options={
                'neighborhood': (
                    (-3, 0), (-3, 0)), 'standard_indexing': 'b', 'cval': 1.5})


if __name__ == "__main__":
    unittest.main()
