

def _resolve_signature(self):
    'Resolve signature.\n        May have ambiguous case.\n        '
    matches = []
    if self.scalarpos:
        for formaltys in self.typemap:
            match_map = []
            for (i, (formal, actual)) in enumerate(zip(formaltys, self.argtypes)):
                if (actual is None):
                    actual = np.asarray(self.args[i]).dtype
                match_map.append((actual == formal))
            if all(match_map):
                matches.append(formaltys)
    if (not matches):
        matches = []
        for formaltys in self.typemap:
            all_matches = all((((actual is None) or (formal == actual)) for (formal, actual) in zip(formaltys, self.argtypes)))
            if all_matches:
                all_matches.append(formaltys)
    if (not matches):
        raise TypeError("No matching version.  GPU ufunc requires array arguments to have the exact types.  This behaves like regular ufunc with casting='no'.")
    if (len(matches) > 1):
        raise TypeError('Failed to resolve ufunc due to ambiguous signature. Too many untyped scalars. Use numpy dtype object to type tag.')
    self.argtypes = matches[0]

dataset/ETHPy150Open numba/numba/numba/npyufunc/deviceufunc.py UFuncMechanism._resolve_signature/VarMisuse@182/240 `matches`->`all_matches`