def test_basic98(self):
        """ Test issue #7286 where the cval is a np attr/string-based numerical
        constant"""
        for cval in (np.nan, np.inf, -np.inf, float('inf'), -float('inf')):
            def kernel(a):
                return a[0, 0]
            ## -----------------------------------------------------------------
            ## Autogenerated kernel

            def __kernel(a, neighborhood):
                self.check_stencil_arrays(a, neighborhood=neighborhood)
                __retdtype = kernel(a)
                __b0 = np.full(a.shape, cval, dtype=type(__retdtype))
                for __bn in range(1, a.shape[1] - 1):
                    for __an in range(1, a.shape[0] - 1):
                        __b0[__an, __bn] = a[__an + 0, __bn + 0]
                return __b0

            ## -----------------------------------------------------------------
            a = np.arange(6.).reshape((2, 3))
            nh = ((-1, 1), (-1, 1),)
            expected = __kernel(a, nh)
            self.check_against_expected(kernel, expected, a,
                                        options={'neighborhood': nh,
                                                 'cval':cval})
 Test issue #7286 where the cval is a np attr/string-based numerical
        constant
numba/tests/test_stencils.py