Skip to content
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

Saving and loading fitted nomials #44

Closed
tonystao opened this issue Jul 20, 2016 · 1 comment
Closed

Saving and loading fitted nomials #44

tonystao opened this issue Jul 20, 2016 · 1 comment
Milestone

Comments

@tonystao
Copy link

There should be some way of saving/loading/manipulating nomials because it can take a long time to generate them.
During loads, it would be convenient to be able to rename variables.

(Pickling worked in the old implementation of nomials, but it doesn't work anymore.)

@whoburg
Copy link
Collaborator

whoburg commented Nov 18, 2016

👍 good issue

re: renaming variables, that's best handled via gpkit's substitution, as in

In [1]: from gpkit import Variable

In [2]: x = Variable("x")

In [3]: p = 1 + x + x**3

In [4]: p.sub({"x": Variable("y_{tony}")})
Out[4]: gpkit.Posynomial(1 + y_{tony} + y_{tony}**3)

@pgkirsch pgkirsch added this to the v1.0 milestone Jul 13, 2021
@pgkirsch pgkirsch mentioned this issue Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants