PEP8: Fix E401 multiple imports on one line
PEP8: Fix E702 multiple statements on one line (semicolon)
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 '# '
Correctly interpret logical matlab arrays as booleans when mat_dtype is set
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