def _cast_check_value_inferene(self, a, b):
        """
        If one of the input is tensor, cast the result to tensor.
        """
        to_cast = any(isinstance(x, np.ndarray) for x in (a, b))
        result = self.get_operator()(a, b)
        return result if not to_cast else np.array(result)

        If one of the input is tensor, cast the result to tensor.
        
coremltools/converters/mil/mil/ops/defs/iOS15/elementwise_binary.py