Skip to content

Commit 772825e

Browse files
committed
Add FutureWarning
1 parent 747fda3 commit 772825e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pymc/func_utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
import warnings
15+
1416
from collections.abc import Callable
1517

1618
import numpy as np
@@ -125,6 +127,14 @@ def find_constrained_prior(
125127
mass_below_lower=0,
126128
)
127129
"""
130+
warnings.warn(
131+
"find_constrained_prior is deprecated and will be removed in a future version. "
132+
"Please use maxent function from PreliZ. "
133+
"https://preliz.readthedocs.io/en/latest/api_reference.html#preliz.unidimensional.maxent",
134+
FutureWarning,
135+
stacklevel=2,
136+
)
137+
128138
assert 0.01 <= mass <= 0.99, (
129139
"This function optimizes the mass of the given distribution +/- "
130140
f"1%, so `mass` has to be between 0.01 and 0.99. You provided {mass}."

0 commit comments

Comments
 (0)