class_docstr: Class for the manifold of Gamma distributions.
  
  This is :math:`Gamma = (R_+^*)^2`, the positive quadrant of the
  2-dimensional Euclidean space.
class_docstr_tok: ["Class","for","the","manifold","of","Gamma","distributions",".","This","is",":","math",":","`","Gamma","=","(","R_+^","*",")","^2","`",",","the","positive","quadrant","of","the","2-dimensional","Euclidean","space","."]
docstr: Estimate parameters from samples.
  
  This is a wrapper around scipy's maximum likelihood estimator to
  estimate the parameters of a gamma distribution from samples.
  
  Parameters
  ----------
  data : list or list of lists/arrays
      Data to estimate parameters from. Lists of
      different length may be passed.
  
  Returns
  -------
  parameter : array-like, shape=[..., 2]
      Estimate of parameter obtained by maximum likelihood.
docstr_tok: ["Estimate","parameters","from","samples",".","This","is","a","wrapper","around","scipy","'s","maximum","likelihood","estimator","to","estimate","the","parameters","of","a","gamma","distribution","from","samples",".","Parameters","--","--","--","--","--","data",":","list","or","list","of","lists\/arrays","Data","to","estimate","parameters","from",".","Lists","of","different","length","may","be","passed",".","Returns","--","--","--","-","parameter",":","array-like",",","shape=","[","...",",","2","]","Estimate","of","parameter","obtained","by","maximum","likelihood","."]
code: def maximum_likelihood_fit(data):
      """Estimate parameters from samples.
  
      This is a wrapper around scipy's maximum likelihood estimator to
      estimate the parameters of a gamma distribution from samples.
  
      Parameters
      ----------
      data : list or list of lists/arrays
          Data to estimate parameters from. Lists of
          different length may be passed.
  
      Returns
      -------
      parameter : array-like, shape=[..., 2]
          Estimate of parameter obtained by maximum likelihood.
      """
  
      def is_nested(sample):
          """Check if sample contains an iterable."""
          for el in sample:
              try:
                  return iter(el)
              except TypeError:
                  return False
  
      if not is_nested(data):
          data = [data]
      parameters = []
      for sample in data:
          sample = gs.array(sample)
          kappa, _, scale = gamma.fit(sample, floc=0)
          nu = 1 / scale
          parameters.append(gs.array([kappa, kappa / nu]))
      return parameters[0] if len(data) == 1 else gs.stack(parameters)
  
imports: from scipy.stats import gamma
  import geomstats.backend
  from geomstats.algebra_utils import from_vector_to_diagonal_matrix
  from geomstats.geometry.base import VectorSpaceOpenSet
  from geomstats.geometry.euclidean import Euclidean
  from geomstats.geometry.riemannian_metric import RiemannianMetric
  from geomstats.information_geometry.base import InformationManifoldMixin, ScipyUnivariateRandomVariable
  from geomstats.numerics.bvp import ScipySolveBVP
  from geomstats.numerics.geodesic import ExpODESolver, LogODESolver
  from geomstats.numerics.ivp import ScipySolveIVP
  from geomstats.vectorization import check_is_batch
label_desc: Use image node_id 8 for calling the GammaDistributions obj's underlying member method code with example usage: obj.maximum_likelihood_fit(data) and returns: unknown, iter, False