def test_basic93(self):
        """ Issue #3497, bool return type evaluating incorrectly. """
        def kernel(a):
            return (a[-1, -1] ^ a[-1, 0] ^ a[-1, 1] ^
                    a[0, -1] ^ a[0, 0] ^ a[0, 1] ^
                    a[1, -1] ^ a[1, 0] ^ a[1, 1])
        # ----------------------------------------------------------------------
        # Autogenerated kernel

        def __kernel(a, neighborhood):
            self.check_stencil_arrays(a, neighborhood=neighborhood)
            __retdtype = kernel(a)
            __b0 = np.full(a.shape, 1, dtype=type(__retdtype))
            for __b in range(1, a.shape[1] - 1):
                for __a in range(1, a.shape[0] - 1):
                    __b0[__a, __b] = (a[__a + -1, __b + -1] ^
                                      a[__a + -1, __b + 0] ^
                                      a[__a + -1, __b + 1] ^
                                      a[__a + 0, __b + -1] ^
                                      a[__a + 0, __b + 0] ^
                                      a[__a + 0, __b + 1] ^
                                      a[__a + 1, __b + -1] ^
                                      a[__a + 1, __b + 0] ^
                                      a[__a + 1, __b + 1])
            return __b0
        # ----------------------------------------------------------------------
        A = np.array(np.arange(20) % 2).reshape(4, 5).astype(np.bool_)
        expected = __kernel(A, None)
        self.check_against_expected(kernel, expected, A, options={'cval': True})
 Issue #3497, bool return type evaluating incorrectly. 
numba/tests/test_stencils.py