TST: adding test cases for COO sum_duplicates
ENH: adding sum_duplicates method to COO matrix
adding has_canonical_format to COO matrix
fixing build errors
incorporating @jaimefrio's vectorized version
MAINT: attempt to improve svds of singular matrices, passes existing tests
MAINT: sparse svd passes new tests
MAINT: simplify code and tests for sparse singular svd
monic is a boolean parameter: False instead of 0
use True/False for boolean `mu` arguments
STY: autopep8 and some manual cleanup

but didn't modify some ugly lambdas
DOC: expand scipy.special.legendre docstring

(I think n must be int, but not sure.)
BUG: signal: fix handling of multi-output systems in ss2tf.  Closes gh-2669
DOC: signal: Use 'two-dimensional' instead of 'rank-2'.
FIX incorrect sorting during fancy assignment

Bug reported by @perimosocordiae on #3264
BUG: stats: Fix ValueError message in chi2_contingency.

chi2_contingency raises a ValueError when a zero occurs in the
table of expected frequencies.  The exception message includes
the position of the zero, but the code that figured out that
position was incorrect.
Merge pull request #3795 from endolith/patch-5

STY: special: improve legendre docstring + pep8 etc. cleanups
Merge pull request #3719 from argriffing/singular-svds-lm

BUG: sparse.linalg: address svds returning nans for zero input matrix
Merge pull request #3881 from jnothman/fix-sort-indices

BUG: sparse: incorrect sorting in CSR fancy assignment
Merge pull request #3646 from perimosocordiae/patch-4

ENH: sparse: adding  `sum_duplicates` method to COO sparse matrix