src/estimagic/optimization/pounders_auxiliary.py
def update_main_model_with_new_accepted_x(main_model, x_candidate):
    """Use accepted candidate to update the linear terms of the residual model.

    Args:
        main_model (dict): Dictionary containing the parameters of the
            main model, i.e. "linear_terms" and "square terms".
        x_candidate (np.ndarray): Vector of centered x candidates of shape (n,).

    Returns:
        main_model_updated (dict): Dictionary containing the parameters of the
            main model with updated "linear_terms".
    """
    main_model_updated = main_model.copy()

    main_model_updated["linear_terms"] = main_model["linear_terms"] + np.dot(
        main_model["square_terms"], x_candidate
    )

    return main_model_updated
Use accepted candidate to update the linear terms of the residual model.

    Args:
        main_model (dict): Dictionary containing the parameters of the
            main model, i.e. "linear_terms" and "square terms".
        x_candidate (np.ndarray): Vector of centered x candidates of shape (n,).

    Returns:
        main_model_updated (dict): Dictionary containing the parameters of the
            main model with updated "linear_terms".
    
Use accepted candidate to update the linear terms of the residual model.
Use accepted candidate to update the linear terms of the residual model .
def update_main_model_with_new_accepted_x(main_model, x_candidate):
    main_model_updated = main_model.copy()
    main_model_updated["linear_terms"] = main_model["linear_terms"] + np.dot(
        main_model["square_terms"], x_candidate
    )
    return main_model_updated
def update_main_model_with_new_accepted_x ( main_model , x_candidate ) : main_model_updated = main_model . copy ( ) main_model_updated [ "linear_terms" ] = main_model [ "linear_terms" ] + np . dot ( main_model [ "square_terms" ] , x_candidate ) return main_model_updated
Use accepted candidate to update the linear terms of the residual model.
Use accepted candidate to update the linear terms of the residual model .
"""Use accepted candidate to update the linear terms of the residual model.

    Args:
        main_model (dict): Dictionary containing the parameters of the
            main model, i.e. "linear_terms" and "square terms".
        x_candidate (np.ndarray): Vector of centered x candidates of shape (n,).

    Returns:
        main_model_updated (dict): Dictionary containing the parameters of the
            main model with updated "linear_terms".
    """
main_model_updated (dict): Dictionary containing the parameters of the
main model with updated "linear_terms".
main_model_updated ( dict ) : Dictionary containing the parameters of the main model with updated " linear_terms " .
main_model
Dictionary containing the parameters of the
main model, i.e. "linear_terms" and "square terms".
Dictionary containing the parameters of the main model i . e . " linear_terms " and " square terms " .
x_candidate
Vector of centered x candidates of shape (n,).
Vector of centered x candidates of shape ( n ) .