Skip to content

Nick/create problem #442

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ntjohnson1
Copy link
Collaborator

@ntjohnson1 ntjohnson1 commented Jun 28, 2025

It would be nice to land #432 first since that resolves all of our doc warnings. I didn't fully merge it here so if that merges first I probably need to review this to make sure I didn't break any new stuff. Alternatively if we want to land this first I can revert the few unrelated commits (they made local iteration cleaner to avoid whatever mac precision thing I'm hitting).

This resolves #312. I added tests but hard to say if things are totally correct. For the sparse generation example in the tutorial I never fully groked that before and didn't dig into it now but the results all seem to look reasonable. There will probably be follow on after this to actual move usages over to this implementation, related to #363. This ended up being a large task than expected so punting on that for now.

Style things:

  • Maybe we need a style doc
  • Matlab has these big arbitrary dictionaries to capture outputs then liberal use of varargin. I haven't been super consistent on this but dataclasses seem nice for some of this and that is the direction I went here
    • The CPProblem vs ExistingCPSolution is a little clunky, but pretty clear/explicit. If I added a solution field to the CPProblem then we'd have a bit of a mess with default values and clarity for when the user want to generate things or not. Open to opinions about the usability
  • If our inputs are clear and unambiguous I don't think returning the input parameters in the output makes sense.

📚 Documentation preview 📚: https://pyttb--442.org.readthedocs.build/en/442/

@ntjohnson1 ntjohnson1 requested a review from dmdunla June 28, 2025 16:31
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.

Implement create_problem from Matlab TTB
1 participant