question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scipy.optimize.line_search returns None

See original GitHub issue

I’m trying to use the scipy.optimize.line_search command but instead of giving me the three values promised by the docs, it gives me (None, 13, 0, None, 853161.73010506318, None) with the optimal alpha nowhere to be found.

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
pvcommented, Dec 11, 2014

The documentation does not mention it, but None means that a suitable step length was not found. Can happen e.g. if the direction is not a descent direction.

0reactions
rlucas7commented, Feb 27, 2019

@pv This issue is a bit old. Not sure if there are still documentation issues here, if so I’m happy to resolve. Are there still remaining issue(s) to resolve? The first 2 issues listed by @argriffing with links have been merged and the referenced PR has also been merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

scipy.optimize.line_search — SciPy v1.9.3 Manual
The line search accepts the value of alpha only if this callable returns True . If the callable returns False for the step...
Read more >
scipy.optimize.minimize line search parameters - Stack Overflow
I tried to do this by changing the default values in line_search , but it had no effect. Here is a simple example...
Read more >
Line Search Optimization With Python
In this tutorial, you will discover how to perform a line search optimization in Python. After completing this tutorial, you will know:.
Read more >
optimize/linesearch.py · stream/scipy - Gemfury
Returns ------- stp, f_count, g_count, fval, old_fval As in `line_search_wolfe1` gval : array Gradient of `f` at the final point """ if gfk...
Read more >
Potential BUG in Scipy Optimize · Issue #9696 - GitHub
Hi! I have encountered an issue with scipy.optimize.minimize, which returns the following error: ValueError: The truth value of a Series is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found