Skip to content

Automatically check for args option when gadma.optimize_ga is using #93

@noscode

Description

@noscode

Sometimes gadma.optimize_ga is using the following way:

popt = gadma.Inference.optimize_ga(
                                   data,
                                   func_ex,
                                   engine='dadi',
                                   args=pts,
                                   p_ids = p_ids,
                                   X_init= [p0],
                                   lower_bound=lower_bound,
                                   upper_bound=upper_bound,
                                   verbose=1)

In that case there is an error:
UserWarning: Error occurred during caching: evaluate() takes 3 positional arguments but 5 were given.

The correct way of usage is: args=(pts,),. It would be great to add an extra check when args are misspecified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions