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

Make sure that deprecation warnings are handled #15

Open
timmens opened this issue Mar 4, 2024 · 0 comments
Open

Make sure that deprecation warnings are handled #15

timmens opened this issue Mar 4, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@timmens
Copy link
Member

timmens commented Mar 4, 2024

Wenn using tranquilo in estimagic, the following warning is raised:

/tranquilo/aggregate_models.py:72: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
    intercept = float(vector_model.intercepts)

TODO

Under the assumption that vector_model.intercepts has size == 1, we should use np.item to copy the element into a standard Python object:

intercept = vector_model.intercepts.item()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant