Skip to content

Commit ec1e78f

Browse files
authored
Remove mode argument previously deprecated (#691)
* remove deprecated argument * remove deprecated argument
1 parent bbd5a43 commit ec1e78f

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

preliz/unidimensional/maxent.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ def maxent(
1111
lower=-1,
1212
upper=1,
1313
mass=None,
14-
mode=None,
1514
fixed_stat=None,
1615
plot=None,
1716
plot_kwargs=None,
@@ -35,11 +34,9 @@ def maxent(
3534
mass: float
3635
Probability mass between ``lower`` and ``upper`` bounds. Defaults to None,
3736
which results in the value of rcParams["stats.ci_prob"] being used.
38-
mode: float
39-
Mode of the distribution. Pass a value to fix the mode of the distribution.
4037
fixed_stat: tuple
4138
Summary statistic to fix. The first element should be a name and the second a
42-
numerical value. Valid names are: "mean", "mode", "median", "variance", "std",
39+
numerical value. Valid names are: "mean", "mode", "median", "var", "std",
4340
"skewness", "kurtosis". Defaults to None.
4441
plot : bool
4542
Whether to plot the distribution, and lower and upper bounds. Defaults to None,
@@ -87,14 +84,6 @@ def maxent(
8784
"""
8885
valid_distribution(distribution)
8986

90-
if mode is not None:
91-
fixed_stat = ("mode", mode)
92-
warnings.warn(
93-
"The parameter `mode` is deprecated and will be removed in a future release. "
94-
"Use `fixed_stat=('mode', mode)` instead.",
95-
FutureWarning,
96-
)
97-
9887
if mass is None:
9988
mass = rcParams["stats.ci_prob"]
10089

@@ -104,7 +93,7 @@ def maxent(
10493
if fixed_stat is None:
10594
fixed_stat = ()
10695
else:
107-
valid_stats = ["mean", "mode", "median", "variance", "std", "skewness", "kurtosis"]
96+
valid_stats = ["mean", "mode", "median", "var", "std", "skewness", "kurtosis"]
10897
if fixed_stat[0] not in valid_stats:
10998
raise ValueError("fixed_stat should be one of the following: " + ", ".join(valid_stats))
11099

0 commit comments

Comments
 (0)