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()
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
BUG: memory leak fix in convolve2d.
Merge pull request #508 from gustavla/master

BUG: signal: memory leak in convolve2d
MAINT: cluster: Remove unused imports, unused variables and commented-out code from hierarchy.py
Merge pull request #510 from WarrenWeckesser/cluster-cleanup

MAINT: cluster: Remove unused imports, unused variables and commented-out code from hierarchy.py
DOC: io: update code comment and whosmat docstring
Merge pull request #504 from batterseapower/master

ENH: io: Present loaded logical Matlab arrays with a boolean dtype

There was already some code which attempted to do this in the Matlab
file reader, but it was broken. To be specific, the old code assigned to
a dtype to a local variable bool_dtype rather than self.bool_dtype, and
so later attempted uses of that dtype would be null/None and so would
not have an effect.

This change makes also the writer set the logical flag if you write out
an array of bools.
BUG: special: add a missing term in the asymptotic expansion of Fresnel C/S
Merge pull request #501 from pv/special-fresnel

BUG: special: add a missing term in the asymptotic expansion of Fresnel C/S
BUG: special: switch to AMOS implementation of Airy functions at large arguments

The Cephes implementation gives wrong results (relative tolerance >
1e-12) after |x| > 10.
GEN: special: regenerate files
Merge pull request #502 from pv/special-airy

BUG: special: switch to AMOS implementation of Airy functions at large arguments