Skip to content

BUG: fix constraints and bunds when use scipy.optimize.minimize - #6657

Merged
josef-pkt merged 1 commit into
statsmodels:masterfrom
emailhy:scipy-optimizer-enhance
Apr 30, 2020
Merged

josef-pkt merged 1 commit into
statsmodels:masterfrom
emailhy:scipy-optimizer-enhance

Conversation

@emailhy

@emailhy emailhy commented Apr 23, 2020 •

Copy link
Copy Markdown
Contributor
Details

Notes:

  • It is essential that you add a test when making code changes. Tests are not
    needed for doc changes.
  • When adding a new function, test values should usually be verified in another package (e.g., R/SAS/Stata).
  • When fixing a bug, you must add a test that would produce the bug in master and
    then show that it is fixed with the new code.
  • New code additions must be well formatted. Changes should pass flake8. If on Linux or OSX, you can
    verify you changes are well formatted by running
    git diff upstream/master -u -- "*.py" | flake8 --diff --isolated
    
    assuming flake8 is installed. This command is also available on Windows
    using the Windows System for Linux once flake8 is installed in the
    local Linux environment. While passing this test is not required, it is good practice and it help
    improve code quality in statsmodels.
  • Docstring additions must render correctly, including escapes and LaTeX.

@pep8speaks

pep8speaks commented Apr 23, 2020 •

Copy link
Copy Markdown

Hello @emailhy! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-04-29 22:27:32 UTC

@emailhy

emailhy commented Apr 23, 2020

Copy link
Copy Markdown
Contributor Author

this should fix issue 6655

@emailhy emailhy closed this Apr 23, 2020
@emailhy emailhy reopened this Apr 23, 2020
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.002%) to 87.711% when pulling e605718 on emailhy:scipy-optimizer-enhance into 1ccd5cd on statsmodels:master.

@coveralls

coveralls commented Apr 23, 2020 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 87.694% when pulling 3e9814b on emailhy:scipy-optimizer-enhance into e714513 on statsmodels:master.

@emailhy emailhy closed this Apr 23, 2020
@emailhy emailhy reopened this Apr 23, 2020
@emailhy emailhy changed the title fix constraint and bunds when use scipy minizie BUG: fix constraints and bunds when use scipy.optimize.minimize Apr 23, 2020
@josef-pkt

Copy link
Copy Markdown
Member

The travis failure is unrelated to this PR (connection failure when retrieving an rdataset)

@josef-pkt josef-pkt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

3 pep-8
(It looks like CI pep-8 checking is off for this)

Comment thread statsmodels/base/optimizer.py Resolved
Comment thread statsmodels/base/tests/test_optimize.py Resolved
Comment thread statsmodels/base/tests/test_optimize.py Resolved
@josef-pkt

Copy link
Copy Markdown
Member

Thanks, LGTM

I check where we could add a unit test that uses a model.fit

@emailhy
emailhy requested a review from josef-pkt April 29, 2020 15:27
@josef-pkt

Copy link
Copy Markdown
Member

I didn't have time to try out an example.

However, it looks good and can be merged.

Can you squash the commits given that most commits are pep-8 and not informative in themselves?

@emailhy
emailhy force-pushed the scipy-optimizer-enhance branch from f57b333 to 622d88b Compare April 29, 2020 22:03
@emailhy
emailhy force-pushed the scipy-optimizer-enhance branch from 622d88b to 3e9814b Compare April 29, 2020 22:27
@josef-pkt

Copy link
Copy Markdown
Member

@emailhy thanks and sorry for the delay.

ready to merge when CI comes back green

@emailhy

emailhy commented Apr 30, 2020

Copy link
Copy Markdown
Contributor Author

I didn't have time to try out an example.

However, it looks good and can be merged.

Can you squash the commits given that most commits are pep-8 and not informative in themselves?

Thank you and I squashed all commits.

@josef-pkt

Copy link
Copy Markdown
Member

all green, merging

@emailhy thanks again for the fix

@josef-pkt
josef-pkt merged commit 5dea830 into statsmodels:master Apr 30, 2020
@josef-pkt josef-pkt added this to the 0.12 milestone May 4, 2020
@emailhy
emailhy deleted the scipy-optimizer-enhance branch October 1, 2020 16:29
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.

got multiple values for argument 'constraints', 'bounds'

4 participants