MAINT: spatial.distance: generate boilerplate with macros
BUG: spatial.distance: fix unchecked malloc
MAINT: spatial.distance: further refactoring

* static on all functions in distance_impl.h
* commented out unused compute_mean_vector
* replaced &&, || with &, | in tight loops
* reindented code according to NumPy conventions
* removed some useless variables
ENH: optimize: curve_fit now warns if pcov is undetermined

Marked the test as a knownfailure for now. The test fails because
assert_warns in numpy.testing should clean __warningregistry__...
FIX: re-enable test for indertemitate covariance warning

Fixed the bogus waring in test_array_like and thus now we can
re-enable the test for the issuing of OptimizeWarning from curve_fit
when the covariance matrix is indeterminate. This works as long as in
the future new tests don't trigger the warning somewhere else in scipy
test suite ;)
Documented the return value for scipy.signal.find_peaks_cwt
DOC: sparse.linalg: typo
MAINT: avoid redundant evaluation of user-provided function in l-bfgs-b optimization
TYPO: funciton
ENH: sparse.linalg: take LinearOperator in svds

Should allow solving PCA for sparse matrix.
DOC: advertise svds(LinearOperator) + vanity
BUG: Match exception declarations between scipy/io/matlab/streams.pyx and
scipy/io/matlab/streams.pxd to prevent an error in recent versions of
cython.
MAINT: default arg None->()
Fix typo in docstring for scipy.spatial.cKDTree
Merge pull request #4088 from abject/fixTypoDocstring

Fix typo in docstring for scipy.spatial.cKDTree
DOC: special: more clear instructions on how to evaluate polynomials
Merge pull request #4091 from pv/doc-polyval

DOC: special: more clear instructions on how to evaluate polynomials
BUG: fitpack: avoid a memory error in splev(x, tck, der=k)

for x < t[0], splev(..., der=k) produces garbage or crashes
because of a memory error.

Fixes gh-2188
Merge pull request #4083 from argriffing/streamline-approx-fprime

MAINT: avoid redundant evaluation of user-provided function in l-bfgs-b optimization
BUG: stats.probplot incorrectly displays the value for R as R^2