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

line_search_armijo throws exception #198

Closed
panispani opened this issue Jul 12, 2020 · 1 comment
Closed

line_search_armijo throws exception #198

panispani opened this issue Jul 12, 2020 · 1 comment

Comments

@panispani
Copy link
Contributor

Describe the bug

scipy.optimize.linesearch.scalar_search_armijo can return alpha=None. In optim.py:line_search_armijo as part of a previous issue #184, we restrict the value of alpha to be at most 1 with min(1, alpha) but this throws an Exception when alpha is None.

Expected behavior

Return None instead of throwing an Exception

Output of the following code snippet:

import platform; print(platform.platform())
import sys; print("Python", sys.version)
import numpy; print("NumPy", numpy.__version__)
import scipy; print("SciPy", scipy.__version__)
import ot; print("POT", ot.__version__)

'''
Darwin-19.2.0-x86_64-i386-64bit
Python 3.7.7 (default, May  6 2020, 04:59:01)
[Clang 4.0.1 (tags/RELEASE_401/final)]
NumPy 1.18.1
SciPy 1.2.1
POT 0.7.0
'''

Additional context

return min(1, alpha), fc[0], phi1

@rflamary
Copy link
Collaborator

Closed in #199

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

2 participants