Skip to content

Make sure that deprecation warnings are handled #15

@timmens

Description

@timmens

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions