Skip to content

Conversation

@moorepants
Copy link
Member

Fixes #202.

@moorepants
Copy link
Member Author

Maybe the only thing to consider here is whether there is a better way to manage the API given you only need to pass in a single argument instead of both the objective and gradient functions.

@moorepants
Copy link
Member Author

We could do Problem.__init__(*args, ...) and then count the number of arguments so that you could skip the gradient function.

@moorepants
Copy link
Member Author

We could also make a second Problem as SymProblem that takes the new arguments.

Or do a Problem.from_symbolic() alternative initializer.

@Peter230655
Copy link
Contributor

Peter230655 commented Nov 2, 2025

If I understand correctly: if the objective function is given symbolically you essentially want to move

obj, obj_grad = create_objective_function(....)

inside of Problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Problem to accept symbolic objectives.

2 participants