Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecation warning for find_constrained_prior #7458

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pymc/func_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import warnings

from collections.abc import Callable

import numpy as np
Expand Down Expand Up @@ -125,6 +127,14 @@ def find_constrained_prior(
mass_below_lower=0,
)
"""
warnings.warn(
"find_constrained_prior is deprecated and will be removed in a future version. "
"Please use maxent function from PreliZ. "
"https://preliz.readthedocs.io/en/latest/api_reference.html#preliz.unidimensional.maxent",
FutureWarning,
stacklevel=2,
)

assert 0.01 <= mass <= 0.99, (
"This function optimizes the mass of the given distribution +/- "
f"1%, so `mass` has to be between 0.01 and 0.99. You provided {mass}."
Expand Down
Loading