class_docstr: Represents any parametric distribution that can be modeled by scipy.
docstr: Initializes a stochastic model that allows to sample from a parametric distribution implemented in Scipy.
  
  For instance, to use a beta distribution with parameters a=2 and b=0.5:
      ScipyDistribution(stats.beta, a=2, b=0.5)
  Or a Gaussian distribution with mean=0 and standard deviation 2:
      ScipyDistribution(stats.norm, loc=2, scale=0.5)
  
  Note that the parameter names need to coincide with the parameter names in the corresponding Scipy
  implementations. See https://docs.scipy.org/doc/scipy/tutorial/stats.html for more information.
  
  :param scipy_distribution: A continuous or discrete distribution parametric distribution implemented in Scipy.
  :param parameters: Set of parameters of the parametric distribution.
docstr_tok: ["Initializes","a","stochastic","model","that","allows","to","sample","from","a","parametric","distribution","implemented","in","Scipy",".","For","instance",",","to","use","a","beta","distribution","with","parameters","a=2","and","b=0.5",":","ScipyDistribution","(","stats.beta",",","a=2",",","b=0.5",")","Or","a","Gaussian","distribution","with","mean=0","and","standard","deviation","2",":","ScipyDistribution","(","stats.norm",",","loc=2",",","scale=0.5",")","Note","that","the","parameter","names","need","to","coincide","with","the","parameter","names","in","the","corresponding","Scipy","implementations",".","See","https",":","\/\/docs.scipy.org\/doc\/scipy\/tutorial\/stats.html","for","more","information",".",":","param","scipy_distribution",":","A","continuous","or","discrete","distribution","parametric","distribution","implemented","in","Scipy",".",":","param","parameters",":","Set","of","parameters","of","the","parametric","distribution","."]
code: def __init__(
      self,
      scipy_distribution: Optional[
          Union[rv_continuous, rv_discrete]
      ] = None,
      **parameters,
  ) -> None:
      """Initializes a stochastic model that allows to sample from a parametric distribution implemented in Scipy.
  
      For instance, to use a beta distribution with parameters a=2 and b=0.5:
          ScipyDistribution(stats.beta, a=2, b=0.5)
      Or a Gaussian distribution with mean=0 and standard deviation 2:
          ScipyDistribution(stats.norm, loc=2, scale=0.5)
  
      Note that the parameter names need to coincide with the parameter names in the corresponding Scipy
      implementations. See https://docs.scipy.org/doc/scipy/tutorial/stats.html for more information.
  
      :param scipy_distribution: A continuous or discrete distribution parametric distribution implemented in Scipy.
      :param parameters: Set of parameters of the parametric distribution.
      """
      self._distribution = scipy_distribution
      self._parameters = parameters
      self._fixed_parameters = len(parameters) > 0
  
imports: import warnings
  from typing import Dict, Optional, Tuple, Union
  import numpy
  import scipy
  from scipy.stats import norm, rv_continuous, rv_discrete
  from sklearn.cluster import KMeans
  from sklearn.metrics import silhouette_score
  from sklearn.mixture import BayesianGaussianMixture
  from dowhy.gcm.causal_mechanisms import StochasticModel
  from dowhy.gcm.util.general import shape_into_2d
label_desc: Use image node_id 1 to create a new ScipyDistribution object from inherited base classes: StochasticModel with example: obj = ScipyDistribution(scipy_distribution)