PEP8: Fix E711 comparison to None should be 'if cond is None:'
PEP8: Fix E228 missing whitespace around modulo operator
PEP8: Fix E251 unexpected spaces around keyword / parameter equals
PEP8: Fix E211 whitespace before '('
PEP8: Fix E227 missing whitespace around bitwise or shift operator
PEP8: Fix E502 the backslash is redundant between brackets
PEP8: Fix E271 multiple spaces after keyword
PEP8: Fix E303 too many blank lines
PEP8: Fix E262 inline comment should start with '# '
TST: stats: add another test for find_repeats()
MAINT: stats: simplify (and speed up a bit) some code in wilcoxon()
PEP8: Fix E222 multiple spaces after operator
BUG: optimize: if line search fails, don't update position

Fix bugs in routines updating the current function value by what was
returned by a failed line search.
BUG: optimize: make _minimize_newtoncg use wolfe criterion line search

The Wolfe condition should guarantee better properties vs. stagnation.
Note that TNC (almost the same as newtoncg) also uses Wolfe conditions.

Fixes Trac #1778
BUG: optimize: do not use magic numbers in line search initialization

Set the old_old_fval to None, so that the initial step size is 1.0.
(Initialization with the magic number also leads to the same condition,
but it's better to be explicit.)
BUG: optimize/linesearch: _zoom() should indicate a failure if maxiter is reached, rather than returning a step size that doesn't satisfy the conditions
TST: optimize: add test for what happens when line searches fail
TST: special/test_mpmath: fix elliptic function tests
TST: special/test_mpmath: fix tests for j0 and j1 --- the results are numerically correct after all
TST: special/test_mpmath: put more weight on testing 1e0..1e5 parameter values