remove sol.sens
See original GitHub issueI can’t figure out how to access a sensitivity…no matter what I try I get a key error. Here it is for one of the examples in the gpkit docs
In [20]: x = gpkit.Variable("x")
In [21]: x_min = gpkit.Variable("x_{min}", 2)
In [22]: sol = gpkit.Model(x, [x_min <= x]).solve()
Using solver 'cvxopt'
Solving for 1 variables.
Solving took 0.0114 seconds.
In [23]: assert sol.sens(x_min) == 1
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-23-f25f4b83c012> in <module>()
----> 1 assert sol.sens(x_min) == 1
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gpkit/solution_array.pyc in sens(self, key)
76 def sens(self, key):
77 "Returns sensitivity of the given variable (unitless)."
---> 78 return NomialArray(self["variables"]["sensitivities"][key])
79
80 def table(self, tables=("cost", "sweepvariables", "freevariables",
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gpkit/keydict.pyc in __getitem__(self, key)
94 keys = self.keymap[key]
95 if not keys:
---> 96 raise KeyError("%s was not found." % key)
97 values = []
98 for key in keys:
KeyError: 'sensitivities was not found.'
any help would be much appreciated…really need to access some sensitivies right now
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
NEW SOL 2.2.3 IS AMAZING! How To Uninstall ... - YouTube
NEW SOL 2.2.3 IS AMAZING! How To Uninstall & Install SOL For Assetto Corsa!
Read more >Remove white space between two plots resulting from grid ...
I'd like to eliminate the white space between my two forest plots that I plotted side-by-side using grid.arrange(). Before you vote down or ......
Read more >Waterproof Sensitive Eye Cleanser - MAKE UP FOR EVER
Suggested Usage: Makeup Removal: -Soak a cotton pad in Sens' Eyes and place on a closed eyelid. -Once it has soaked into the...
Read more >PSTrace Manual
Switch on PalmSens by pressing the power key until the display shows: “Selftest”. During the self test the voltage range of the instrument...
Read more >When Beauty Products Cause Sun Sensitivity
Some of your favorite serums and creams could be increasing your sun sensitivity without you even knowing. The ingredients most likely to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Naw, it’s a bug! This should have been unit tested…
@mjburton11