@@ -508,6 +508,9 @@ def _cdf_untransformed_untruncated(self, x) -> np.ndarray | float:
508508 def _ppf_untransformed_untruncated (self , q ) -> np .ndarray | float :
509509 return cauchy .ppf (q , loc = self ._loc , scale = self ._scale )
510510
511+ def _sample (self , shape = None ) -> np .ndarray | float :
512+ return cauchy .rvs (loc = self ._loc , scale = self ._scale , size = shape )
513+
511514 @property
512515 def loc (self ) -> float :
513516 """The location parameter of the underlying distribution."""
@@ -565,6 +568,9 @@ def _cdf_untransformed_untruncated(self, x) -> np.ndarray | float:
565568 def _ppf_untransformed_untruncated (self , q ) -> np .ndarray | float :
566569 return chi2 .ppf (q , df = self ._dof )
567570
571+ def _sample (self , shape = None ) -> np .ndarray | float :
572+ return chi2 .rvs (df = self ._dof , size = shape )
573+
568574 @property
569575 def dof (self ) -> int :
570576 """The degrees of freedom parameter."""
@@ -602,6 +608,9 @@ def _cdf_untransformed_untruncated(self, x) -> np.ndarray | float:
602608 def _ppf_untransformed_untruncated (self , q ) -> np .ndarray | float :
603609 return expon .ppf (q , scale = self ._scale )
604610
611+ def _sample (self , shape = None ) -> np .ndarray | float :
612+ return expon .rvs (scale = self ._scale , size = shape )
613+
605614 @property
606615 def scale (self ) -> float :
607616 """The scale parameter of the underlying distribution."""
@@ -650,6 +659,9 @@ def _cdf_untransformed_untruncated(self, x) -> np.ndarray | float:
650659 def _ppf_untransformed_untruncated (self , q ) -> np .ndarray | float :
651660 return gamma .ppf (q , a = self ._shape , scale = self ._scale )
652661
662+ def _sample (self , shape = None ) -> np .ndarray | float :
663+ return gamma .rvs (a = self ._shape , scale = self ._scale , size = shape )
664+
653665 @property
654666 def shape (self ) -> float :
655667 """The shape parameter of the underlying distribution."""
@@ -700,6 +712,9 @@ def _cdf_untransformed_untruncated(self, x) -> np.ndarray | float:
700712 def _ppf_untransformed_untruncated (self , q ) -> np .ndarray | float :
701713 return rayleigh .ppf (q , scale = self ._scale )
702714
715+ def _sample (self , shape = None ) -> np .ndarray | float :
716+ return rayleigh .rvs (scale = self ._scale , size = shape )
717+
703718 @property
704719 def scale (self ) -> float :
705720 """The scale parameter of the underlying distribution."""
0 commit comments