parameters: (self, a, b)
return_statement: return result if not to_cast else np.array(result)
docstring: If one of the input is tensor, cast the result to tensor.
docstring_summary: If one of the input is tensor, cast the result to tensor.
docstring_tokens: If one of the input is tensor cast the result to tensor .
function: 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)
function_tokens: def _cast_check_value_inferene ( self , a , b ) : 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 )