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: fixing linprog's kwarg order to match docs

The upper bound and equality constraint kwargs were swapped, which means that people following the docstring ordering (and not using keywords) would inadvertently supply the wrong constraints.
Merge pull request #3886 from perimosocordiae/patch-6

BUG: fixing linprog's kwarg order to match docs
BUG: Handle the case where status != 2

The local variable `message` wasn't being set in all cases, causing runtime errors.
Merge pull request #3888 from perimosocordiae/patch-6

BUG: optimize: In _linprog_simplex, handle the case where the status returned by _solve_simplex is not 0 or 2.
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.