class_docstr: Normal mixture log-likelihood
  
  .. math::
  
      f(x \mid w, \mu, \sigma^2) = \sum_{i = 1}^n w_i N(x \mid \mu_i, \sigma^2_i)
  
  ========  =======================================
  Support   :math:`x \in \mathbb{R}`
  Mean      :math:`\sum_{i = 1}^n w_i \mu_i`
  Variance  :math:`\sum_{i = 1}^n w_i (\sigma^2_i + \mu_i^2) - \left(\sum_{i = 1}^n w_i \mu_i\right)^2`
  ========  =======================================
  
  Parameters
  ----------
  w : tensor_like of float
      w >= 0 and w <= 1
      the mixture weights
  mu : tensor_like of float
      the component means
  sigma : tensor_like of float
      the component standard deviations
  tau : tensor_like of float
      the component precisions
  comp_shape : shape of the Normal component
      notice that it should be different than the shape
      of the mixture distribution, with the last axis representing
      the number of components.
  
  Notes
  -----
  You only have to pass in sigma or tau, but not both.
  
  Examples
  --------
  .. code-block:: python
  
      n_components = 3
  
      with pm.Model() as gauss_mix:
          μ = pm.Normal(
              "μ",
              mu=data.mean(),
              sigma=10,
              shape=n_components,
              transform=pm.distributions.transforms.ordered,
              initval=[1, 2, 3],
          )
          σ = pm.HalfNormal("σ", sigma=10, shape=n_components)
          weights = pm.Dirichlet("w", np.ones(n_components))
  
          y = pm.NormalMixture("y", w=weights, mu=μ, sigma=σ, observed=data)
class_docstr_tok: ["Normal","mixture","log-likelihood","..","math",":",":","f","(","x","\\mid","w",",","\\mu",",","\\sigma^2",")","=","\\sum_","{","i","=","1","}","^n","w_i","N","(","x","\\mid","\\mu_i",",","\\sigma^2_i",")","========","=======================================","Support",":","math",":","`","x","\\in","\\mathbb","{","R","}","`","Mean",":","math",":","`","\\sum_","{","i","=","1","}","^n","w_i","\\mu_i","`","Variance",":","math",":","`","\\sum_","{","i","=","1","}","^n","w_i","(","\\sigma^2_i","+","\\mu_i^2",")","-","\\left","(","\\sum_","{","i","=","1","}","^n","w_i","\\mu_i\\right",")","^2","`","========","=======================================","Parameters","--","--","--","--","--","w",":","tensor_like","of","float","w",">","=","0","and","w","<","=","1","the","mixture","weights","mu",":","tensor_like","of","float","the","component","means","sigma",":","tensor_like","of","float","the","component","standard","deviations","tau",":","tensor_like","of","float","the","component","precisions","comp_shape",":","shape","of","the","Normal","component","notice","that","it","should","be","different","than","the","shape","of","the","mixture","distribution",",","with","the","last","axis","representing","the","number","of","components",".","Notes","--","--","-","You","only","have","to","pass","in","sigma","or","tau",",","but","not","both",".","Examples","--","--","--","--","..","code-block",":",":","python","n_components","=","3","with","pm.Model","(",")","as","gauss_mix",":","\u03bc","=","pm.Normal","(","``","\u03bc","''",",","mu=data.mean","(",")",",","sigma=10",",","shape=n_components",",","transform=pm.distributions.transforms.ordered",",","initval=","[","1",",","2",",","3","]",",",")","\u03c3","=","pm.HalfNormal","(","``","\u03c3","''",",","sigma=10",",","shape=n_components",")","weights","=","pm.Dirichlet","(","``","w","''",",","np.ones","(","n_components",")",")","y","=","pm.NormalMixture","(","``","y","''",",","w=weights",",","mu=\u03bc",",","sigma=\u03c3",",","observed=data",")"]
code: def dist(cls, w, mu, sigma=None, tau=None, comp_shape=(), **kwargs):
      _, sigma = get_tau_sigma(tau=tau, sigma=sigma)
  
      return Mixture.dist(
          w, Normal.dist(mu, sigma=sigma, size=comp_shape), **kwargs
      )
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  from pytensor.graph.basic import Node, equal_computations
  from pytensor.tensor import TensorVariable
  from pytensor.tensor.random.op import RandomVariable
  from pymc.distributions import transforms
  from pymc.distributions.continuous import Gamma, LogNormal, Normal, get_tau_sigma
  from pymc.distributions.discrete import Binomial, NegativeBinomial, Poisson
  from pymc.distributions.dist_math import check_parameters
  from pymc.distributions.distribution import DiracDelta, Distribution, SymbolicRandomVariable, _moment, moment
  from pymc.distributions.shape_utils import _change_dist_size, change_dist_size
  from pymc.distributions.transforms import _default_transform
  from pymc.distributions.truncated import Truncated
  from pymc.logprob.abstract import _logcdf, _logcdf_helper, _logprob
  from pymc.logprob.basic import logp
  from pymc.logprob.transforms import IntervalTransform
  from pymc.pytensorf import floatX
  from pymc.util import check_dist_not_registered
  from pymc.vartypes import continuous_types, discrete_types
label_desc: Use image node_id 2 for calling the NormalMixture obj's underlying member method code with example usage: obj.dist(cls, w, mu, sigma, tau, comp_shape) and returns: Mixture