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

BUG: optimize: fix bug when variables fixed by bounds are inconsistent with constraints #8237

Merged
merged 3 commits into from
Feb 8, 2018

Conversation

mdhaber
Copy link
Contributor

@mdhaber mdhaber commented Dec 20, 2017

Fixes #8234

Copy link
Contributor

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An optimize guru might want to take a look as well. Just made a suggestion re: unit test design, but probably not a crucial matter.

method=self.method)
_assert_infeasible(res)

def test_bounds_equal_but_infeasible2(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's probably some potential to reduce code duplication via a parametrized pytest approach since the input data is the same for both tests with the exception of the argument specifications (i.e., A_eq vs. A_ub). I'm not sure it would be that much cleaner though since you'd likely need to specify the default None argument for i.e., A_eq when using A_ub, but just a thought given the test similarities.

A pytest fixture might be another option or something that could be used in combination so the parametrization isn't too bulky.

@pv pv merged commit 4a1fa0c into scipy:master Feb 8, 2018
@pv
Copy link
Member

pv commented Feb 8, 2018

thanks, lgtm

@pv pv added this to the 1.0.1 milestone Feb 8, 2018
@pv pv added the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Feb 8, 2018
rgommers pushed a commit to rgommers/scipy that referenced this pull request Mar 17, 2018
@rgommers rgommers mentioned this pull request Mar 17, 2018
@rgommers rgommers removed the backport-candidate This fix should be ported by a maintainer to previous SciPy versions. label Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants