L-BFGS returns a NaN gradient when providing analytical gradient. BFGS shows no issues

A self-contained MWE would help a lot in investigating this.

2 Likes