code: def meanprecision(a):
      '''Mean and precision of Dirichlet distribution.
  
      Parameters
      ----------
      a : array
          Parameters of Dirichlet distribution.
  
      Returns
      -------
      mean : array
          Numbers [0,1] of the means of the Dirichlet distribution.
      precision : float
          Precision or concentration parameter of the Dirichlet distribution.'''
  
      s = a.sum()
      m = a / s
      return (m,sf meanprecision(a):
      '''Mean and precision of Dirichlet distribution.
  
      Parameters
      ----------
      a : array
          Parameters of Dirichlet distribution.
  
      Returns
      -------
      mean : array
          Numbers [0,1] of the means of the Dirichlet distribution.
      precision : float
          Precision or concentration parameter of the Dirichlet distribution.'''
  
      s = a.sum()
      m = a / s
      return (m,s)
docs: Mean and precision of Dirichlet distribution.
  
      Parameters
      ----------
      a : array
          Parameters of Dirichlet distribution.
  
      Returns
      -------
      mean : array
          Numbers [0,1] of the means of the Dirichlet distribution.
      precision : float
          Precision or concentration parameter of the Dirichlet distribution.