parameters: (x, axis=(), keep_dims=False)
return_statement: return reduce_mean(x, axis)
docstring: Reduces a dimension of a tensor by averaging all elements in the dimension.
  
      Args:
          axis (Union[None, int, tuple(int), list(int)]): Dimensions of reduction,
              when axis is None or empty tuple, reduce all dimensions. Default: ().
          keep_dims (bool): Whether to keep the reduced dimensions. Default: False.
  
      Returns:
          Tensor, has the same data type as input tensor.
  
      Supported Platforms:
          ``Ascend`` ``GPU`` ``CPU``
  
      Examples:
          >>> import numpy as np
          >>> from mindspore import Tensor
          >>> input_x = Tensor(np.array([1, 2, 3], dtype=np.float32))
          >>> output = input_x.mean()
          >>> print(output)
          2.0
docstring_summary: Reduces a dimension of a tensor by averaging all elements in the dimension.
docstring_tokens: Reduces a dimension of a tensor by averaging all elements in the dimension .
function: def mean(x, axis=(), keep_dims=False):
      """
      Reduces a dimension of a tensor by averaging all elements in the dimension.
  
      Args:
          axis (Union[None, int, tuple(int), list(int)]): Dimensions of reduction,
              when axis is None or empty tuple, reduce all dimensions. Default: ().
          keep_dims (bool): Whether to keep the reduced dimensions. Default: False.
  
      Returns:
          Tensor, has the same data type as input tensor.
  
      Supported Platforms:
          ``Ascend`` ``GPU`` ``CPU``
  
      Examples:
          >>> import numpy as np
          >>> from mindspore import Tensor
          >>> input_x = Tensor(np.array([1, 2, 3], dtype=np.float32))
          >>> output = input_x.mean()
          >>> print(output)
          2.0
      """
      if axis is None:
          axis = ()
      reduce_mean = P.ReduceMean(keep_dims)
      return reduce_mean(x, axis)
function_tokens: def mean ( x , axis = ( ) , keep_dims = False ) : if axis is None : axis = ( ) reduce_mean = P . ReduceMean ( keep_dims ) return reduce_mean ( x , axis )