class_docstr: Circle mean.
  
  Parameters
  ----------
  space : Manifold
      Equipped manifold.
  
  Attributes
  ----------
  estimate_ : array-like, shape=[2,]
      If fit, Frechet mean.
class_docstr_tok: ["Circle","mean",".","Parameters","--","--","--","--","--","space",":","Manifold","Equipped","manifold",".","Attributes","--","--","--","--","--","estimate_",":","array-like",",","shape=","[","2",",","]","If","fit",",","Frechet","mean","."]
docstr: Compute the minimizer of the variance functional.
  
  Parameters
  ----------
  mean : float
      Mean angle.
  var : float
      Variance of the angles.
  n_samples : int
      Number of samples.
  points : array-like, shape=[n_samples,]
      Data set of ordered angles.
  
  References
  ----------
  .. [HH15] Hotz, T. and S. F. Huckemann (2015), "Intrinsic means on the
      circle: Uniqueness, locus and asymptotics", Annals of the Institute of
      Statistical Mathematics 67 (1), 177–193.
      https://arxiv.org/abs/1108.2141
code: def _circle_variances(mean, var, n_samples, points):
      """Compute the minimizer of the variance functional.
  
      Parameters
      ----------
      mean : float
          Mean angle.
      var : float
          Variance of the angles.
      n_samples : int
          Number of samples.
      points : array-like, shape=[n_samples,]
          Data set of ordered angles.
  
      References
      ----------
      .. [HH15] Hotz, T. and S. F. Huckemann (2015), "Intrinsic means on the
          circle: Uniqueness, locus and asymptotics", Annals of the Institute of
          Statistical Mathematics 67 (1), 177–193.
          https://arxiv.org/abs/1108.2141
      """
      means = (
          mean + gs.linspace(0.0, 2 * gs.pi, n_samples + 1)[:-1]
      ) % (2 * gs.pi)
      means = gs.where(means >= gs.pi, means - 2 * gs.pi, means)
      parts = gs.array(
          [gs.sum(points) / n_samples if means[0] < 0 else 0]
      )
      m_plus = means >= 0
      left_sums = gs.cumsum(points)
      right_sums = left_sums[-1] - left_sums
      i = gs.arange(n_samples, dtype=right_sums.dtype)
      j = i[1:]
      parts2 = right_sums[:-1] / (n_samples - j)
      first_term = parts2[:1]
      parts2 = gs.where(m_plus[1:], left_sums[:-1] / j, parts2)
      parts = gs.concatenate([parts, first_term, parts2[1:]])
  
      # Formula (6) from [HH15]_
      plus_vec = (4 * gs.pi * i / n_samples) * (
          gs.pi + parts - mean
      ) - (2 * gs.pi * i / n_samples) ** 2
      minus_vec = (4 * gs.pi * (n_samples - i) / n_samples) * (
          gs.pi - parts + mean
      ) - (2 * gs.pi * (n_samples - i) / n_samples) ** 2
      minus_vec = gs.where(m_plus, plus_vec, minus_vec)
      means = gs.transpose(gs.vstack([means, var + minus_vec]))
      return means
  
imports: import abc
  import logging
  import math
  from sklearn.base import BaseEstimator
  import geomstats.backend
  import geomstats.errors
  from geomstats.geometry.discrete_curves import ElasticTranslationMetric, SRVTranslationMetric
  from geomstats.geometry.euclidean import EuclideanMetric
  from geomstats.geometry.hypersphere import HypersphereMetric
  from geomstats.geometry.matrices import MatricesMetric
  from geomstats.geometry.minkowski import MinkowskiMetric
label_desc: Use image node_id 3 for calling the CircleMean obj's underlying member method code with example usage: obj._circle_variances(mean, var, n_samples, points) and returns: means