Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
MAfarrag committed Aug 16, 2024
1 parent 9b7f77a commit 1ab4717
Showing 1 changed file with 44 additions and 6 deletions.
50 changes: 44 additions & 6 deletions statista/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def pdf(
fontsize: Union[float, int] = 15,
data: Union[List[float], np.ndarray] = None,
**kwargs,
) -> Union[Tuple[np.ndarray, Figure, Any], np.ndarray]:
) -> Union[np.ndarray, Tuple[np.ndarray, Figure, Axes]]:
"""pdf.
Returns the value of Gumbel's pdf with parameters loc and scale at x.
Expand Down Expand Up @@ -223,6 +223,10 @@ def pdf(
-------
pdf: [array]
probability density function pdf.
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
"""

if data is None:
Expand Down Expand Up @@ -636,7 +640,7 @@ def pdf(
data: Union[List[float], np.ndarray] = None,
*args,
**kwargs,
) -> Union[Tuple[np.ndarray, Figure, Any], np.ndarray]:
) -> Union[np.ndarray, Tuple[np.ndarray, Figure, Any]]:
"""pdf.
Returns the value of Gumbel's pdf with parameters loc and scale at x.
Expand Down Expand Up @@ -670,6 +674,10 @@ def pdf(
-------
pdf: [np.ndarray]
probability density function pdf.
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
Examples
--------
Expand Down Expand Up @@ -800,9 +808,9 @@ def cdf(
-------
cdf: [array]
cumulative distribution function cdf.
fig: matplotlib.figure.Figure
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
Examples
Expand Down Expand Up @@ -1475,6 +1483,10 @@ def pdf(
-------
pdf: [np.ndarray]
probability density function pdf.
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
Examples
--------
Expand Down Expand Up @@ -1625,9 +1637,9 @@ def cdf(
-------
cdf: [array]
cumulative distribution function cdf.
fig: matplotlib.figure.Figure
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
Examples
Expand Down Expand Up @@ -2530,6 +2542,10 @@ def pdf(
-------
pdf: [array]
probability density function pdf.
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
Examples
--------
Expand Down Expand Up @@ -2665,6 +2681,15 @@ def cdf(
fontsize: [int]
Default is 15.
Returns
-------
cdf: [array]
probability density function cdf.
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
Examples
--------
>>> data = np.loadtxt("examples/data/expo.txt")
Expand Down Expand Up @@ -2958,6 +2983,10 @@ def pdf(
-------
pdf: [array]
probability density function pdf.
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
"""
result = super().pdf(
parameters=parameters,
Expand Down Expand Up @@ -3020,6 +3049,15 @@ def cdf(
Default is "cdf".
fontsize: [int]
Default is 15.
Returns
-------
cdf: [array]
probability density function cdf.
fig: matplotlib.figure.Figure, if `plot_figure` is True.
Figure object.
ax: matplotlib.axes.Axes, if `plot_figure` is True.
Axes object.
"""
result = super().cdf(
parameters=parameters,
Expand Down

0 comments on commit 1ab4717

Please sign in to comment.