def test_type_inference(self):
        """This is testing numpy ufunc dispatch machinery
        """
        global vector_add
        vector_add = vectorize([
            bool_(double, int_),
            double(double, double),
            float32(double, float32),
        ])(add)

        def numba_type_equal(a, b):
            self.assertEqual(a.dtype, b.dtype)
            self.assertEqual(a.ndim, b.ndim)

        numba_type_equal(func(np.dtype(np.float64), np.dtype('i')), bool_[:])
        numba_type_equal(func(np.dtype(np.float64), np.dtype(np.float64)),
                         double[:])
        # This is because the double(double, double) matches first
        numba_type_equal(func(np.dtype(np.float64), np.dtype(np.float32)),
                         double[:])
This is testing numpy ufunc dispatch machinery
        
numba/tests/test_vectorization_type_inference.py