parameters: (sample, bins=10, range=None, weights=None, density=False)
return_statement: return count, bin_edges
docstring: Computes the multidimensional histogram of some data.
  
      Note:
          Deprecated numpy argument `normed` is not supported.
  
      Args:
          sample (Union[list, tuple, Tensor]): The data to be histogrammed, either `(N, D)`
              array, or `(D, N)` array_like. Note the unusual interpretation of sample
              when an array_like:
  
              When an array, each row is a coordinate in a `D-dimensional` space, such as
              ``histogramdd(np.array([p1, p2, p3]))``.
  
              When an array_like, each element is the list of values for single coordinate,
              such as ``histogramdd((X, Y, Z))``.
  
              The first form should be preferred.
          bins (Union[int, tuple, list], optional): The bin specification:
  
              A sequence of arrays describing the monotonically increasing bin edges along
              each dimension.
  
              The number of bins for each dimension ``(nx, ny, … =bins)``
  
              The number of bins for all dimensions ``(nx=ny=…=bins)``.
          range(Union[list, tuple], optional): A sequence of length `D`, each an optional
              ``(lower, upper)`` tuple giving the outer bin edges to be used if the edges
              are not given explicitly in bins. An entry of None in the sequence results in
              the minimum and maximum values being used for the corresponding dimension.
              The default, None, is equivalent to passing a tuple of `D` None values.
          weights (Union[list, tuple, Tensor], optional): An array with shape `(N,)` of values
              `w_i` weighing each sample ``(x_i, y_i, z_i, …)``.
          density (boolean, optional): If False, the default, returns the number of samples
              in each bin. If True, returns the probability density function at the bin,
              ``bin_count / sample_count / bin_volume``.
  
      Returns:
          (Tensor, list of Tensor), the values of the histogram and the bin edges.
  
      Raises:
          ValueError: If `range` does not have the same size as the number of samples.
  
      Supported Platforms:
          ``Ascend`` ``GPU`` ``CPU``
  
      Examples:
          >>> from mindspore import numpy as np
          >>> sample = np.arange(15).reshape(5, 3)
          >>> print(sample)
          [[ 0  1  2]
          [ 3  4  5]
          [ 6  7  8]
          [ 9 10 11]
          [12 13 14]]
          >>> print(np.histogramdd(sample, bins=(2, 3, 4)))
          (Tensor(shape=[2, 3, 4], dtype=Float32, value=
          [[[ 1.00000000e+00,  1.00000000e+00,  0.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00]],
          [[ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  1.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  2.00000000e+00]]]),
          [Tensor(shape=[3], dtype=Float32, value= [ 0.00000000e+00,  6.00000000e+00,  1.20000000e+01]),
          Tensor(shape=[4], dtype=Float32, value=
          [ 1.00000000e+00,  5.00000000e+00,  9.00000000e+00,  1.30000000e+01]),
          Tensor(shape=[5], dtype=Float32, value=
          [ 2.00000000e+00,  5.00000000e+00,  8.00000000e+00,  1.10000000e+01,  1.40000000e+01])])
docstring_summary: Computes the multidimensional histogram of some data.
docstring_tokens: Computes the multidimensional histogram of some data .
function: def histogramdd(sample, bins=10, range=None, weights=None, density=False): # pylint: disable=redefined-builtin
      """
      Computes the multidimensional histogram of some data.
  
      Note:
          Deprecated numpy argument `normed` is not supported.
  
      Args:
          sample (Union[list, tuple, Tensor]): The data to be histogrammed, either `(N, D)`
              array, or `(D, N)` array_like. Note the unusual interpretation of sample
              when an array_like:
  
              When an array, each row is a coordinate in a `D-dimensional` space, such as
              ``histogramdd(np.array([p1, p2, p3]))``.
  
              When an array_like, each element is the list of values for single coordinate,
              such as ``histogramdd((X, Y, Z))``.
  
              The first form should be preferred.
          bins (Union[int, tuple, list], optional): The bin specification:
  
              A sequence of arrays describing the monotonically increasing bin edges along
              each dimension.
  
              The number of bins for each dimension ``(nx, ny, … =bins)``
  
              The number of bins for all dimensions ``(nx=ny=…=bins)``.
          range(Union[list, tuple], optional): A sequence of length `D`, each an optional
              ``(lower, upper)`` tuple giving the outer bin edges to be used if the edges
              are not given explicitly in bins. An entry of None in the sequence results in
              the minimum and maximum values being used for the corresponding dimension.
              The default, None, is equivalent to passing a tuple of `D` None values.
          weights (Union[list, tuple, Tensor], optional): An array with shape `(N,)` of values
              `w_i` weighing each sample ``(x_i, y_i, z_i, …)``.
          density (boolean, optional): If False, the default, returns the number of samples
              in each bin. If True, returns the probability density function at the bin,
              ``bin_count / sample_count / bin_volume``.
  
      Returns:
          (Tensor, list of Tensor), the values of the histogram and the bin edges.
  
      Raises:
          ValueError: If `range` does not have the same size as the number of samples.
  
      Supported Platforms:
          ``Ascend`` ``GPU`` ``CPU``
  
      Examples:
          >>> from mindspore import numpy as np
          >>> sample = np.arange(15).reshape(5, 3)
          >>> print(sample)
          [[ 0  1  2]
          [ 3  4  5]
          [ 6  7  8]
          [ 9 10 11]
          [12 13 14]]
          >>> print(np.histogramdd(sample, bins=(2, 3, 4)))
          (Tensor(shape=[2, 3, 4], dtype=Float32, value=
          [[[ 1.00000000e+00,  1.00000000e+00,  0.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00]],
          [[ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  1.00000000e+00,  0.00000000e+00],
          [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,  2.00000000e+00]]]),
          [Tensor(shape=[3], dtype=Float32, value= [ 0.00000000e+00,  6.00000000e+00,  1.20000000e+01]),
          Tensor(shape=[4], dtype=Float32, value=
          [ 1.00000000e+00,  5.00000000e+00,  9.00000000e+00,  1.30000000e+01]),
          Tensor(shape=[5], dtype=Float32, value=
          [ 2.00000000e+00,  5.00000000e+00,  8.00000000e+00,  1.10000000e+01,  1.40000000e+01])])
      """
      if isinstance(sample, (tuple, list)):
          sample = _to_tensor(*sample)
          sample = stack(sample, -1)
      elif not isinstance(sample, Tensor):
          _raise_type_error('sample should be (N, D) array, or (D, N) array_like')
      if F.rank(sample) != 2:
          _raise_value_error('when an array, sample should be 2-dimensional')
      ndim = F.shape(sample)[1]
  
      if isinstance(bins, int):
          bins = _list_comprehensions(ndim, bins)
      if isinstance(bins, (tuple, list, Tensor)):
          if len(bins) != ndim:
              _raise_value_error('The dimension of bins must be equal to the dimension of the sample')
      else:
          _raise_type_error('bins should be int or sequence')
  
      if range is None:
          range = _list_comprehensions(ndim, None, False, True)
      else:
          if len(range) != ndim:
              _raise_value_error('range argument must have one entry per dimension')
  
      bin_edges = []
      dedges = []
      for i in F.make_range(ndim):
          edges = histogram_bin_edges(sample[:, i], bins[i], range[i], weights)
          bin_edges.append(edges)
          dedges.append(diff(edges))
  
      count = _get_histogramdd_count(ndim, bin_edges, sample, weights)
  
      if density:
          s = F.reduce_sum(count.astype(mstype.float32))
          for i in F.make_range(ndim):
              shape = _expanded_shape(ndim, dedges[i].size, i)
              count /= _to_tensor(dedges[i]).reshape(shape)
          count /= s
      return count, bin_edges
function_tokens: def histogramdd ( sample , bins = 10 , range = None , weights = None , density = False ) : # pylint: disable=redefined-builtin if isinstance ( sample , ( tuple , list ) ) : sample = _to_tensor ( * sample ) sample = stack ( sample , - 1 ) elif not isinstance ( sample , Tensor ) : _raise_type_error ( 'sample should be (N, D) array, or (D, N) array_like' ) if F . rank ( sample ) != 2 : _raise_value_error ( 'when an array, sample should be 2-dimensional' ) ndim = F . shape ( sample ) [ 1 ] if isinstance ( bins , int ) : bins = _list_comprehensions ( ndim , bins ) if isinstance ( bins , ( tuple , list , Tensor ) ) : if len ( bins ) != ndim : _raise_value_error ( 'The dimension of bins must be equal to the dimension of the sample' ) else : _raise_type_error ( 'bins should be int or sequence' ) if range is None : range = _list_comprehensions ( ndim , None , False , True ) else : if len ( range ) != ndim : _raise_value_error ( 'range argument must have one entry per dimension' ) bin_edges = [ ] dedges = [ ] for i in F . make_range ( ndim ) : edges = histogram_bin_edges ( sample [ : , i ] , bins [ i ] , range [ i ] , weights ) bin_edges . append ( edges ) dedges . append ( diff ( edges ) ) count = _get_histogramdd_count ( ndim , bin_edges , sample , weights ) if density : s = F . reduce_sum ( count . astype ( mstype . float32 ) ) for i in F . make_range ( ndim ) : shape = _expanded_shape ( ndim , dedges [ i ] . size , i ) count /= _to_tensor ( dedges [ i ] ) . reshape ( shape ) count /= s return count , bin_edges