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
DOC: remove docstring from UnivariateSpline.__init__

same for InterpolatedUnivariateSpline and LSQUnivariateSpline.
These simply duplicated the class docstrings.
DOC: improve the docstrings of *UnivariateSpline classes

Tweak examples to make plots actually render.
DOC: add a nan masking example to the UnivariateSpline docstring

example is by @juliantaylor,
https://github.com/scipy/scipy/issues/3531#issuecomment-40233093
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__...
BUG: misc: Ensure that the 'size' argument of PIL's 'resize' method is a tuple.

In Pillow 2.5.3, the code for the 'resize' function has a statement of the
form 'if self.size == size: ...'.  The expectation is that 'self.size' and
'size' are tuples.  If 'size' is a numpy array, the comparison raises
'ValueError: The truth value of an array with more than one element is
ambiguous.'

This commit ensures that the 'size' argument passed to the 'resize' method
is a tuple.

Closes gh-4032.
MAINT: misc: Remove unused imports and do some PEP8 clean up in pilutil.py.
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 ;)
BUG: expm of integer matrices
TST: strengthen the test for expm of integer matrices
Merge pull request #4051 from argriffing/expm-integer

BUG: sparse: expm of integer matrices
BUG: stats: Refactor argument validation to avoid a unicode issue.

Fixes the handling of a unicode argument to the binned statistics
functions.

Closes gh-4026.
Merge pull request #4053 from WarrenWeckesser/binned-stat-str

BUG: stats: Refactor argument validation to avoid a unicode issue.
Added newline to documentation for correct display.
Merge pull request #4057 from alexeyum/svds-doc

Added newline to scipy.sparse.linalg.svds documentation for correct display.
MAINT: stats: Add note about change to scoreatpercentile in release 0.12.0.

Also make a test of scoreatpercentile on a 2D array more explicit
about the expected result.

Closes gh-3329.
ENH: interpolate: Allow splev to accept an n-dimensional array.

Closes gh-4045.
Merge pull request #4041 from WarrenWeckesser/imresize-tuple

BUG: misc: Ensure that the 'size' argument of PIL's 'resize' method is a tuple.