parameters: (x)
return_statement: return x.item()
docstring: Convert a scalar tensor into a Python value.
docstring_summary: Convert a scalar tensor into a Python value.
docstring_tokens: Convert a scalar tensor into a Python value .
function: def _scalar(x):
      """Convert a scalar tensor into a Python value."""
      assert x.numel() == 1
      return x.item()
function_tokens: def _scalar ( x ) : assert x . numel ( ) == 1 return x . item ( )