scipy/scipy — pull request #2732 by cowlicks (2013-08-16 20:45:42+00:00)
Title: NumPy Ufunc and dot overrides for sparse matrices.

This pull request is dependent on the `__numpy_ufunc__` functionality being added to NumPy-1.8 [link](https://github.com/numpy/numpy/pull/3524). That has not been accepted yet, so I'm not sure if this can be considered for SciPy-0.13.

This overrides `np.dot`, `np.multiply`, `np.divide`, `np.subtract`, and `np.add` when they are called on sparse matrices. Tests are included which check NumPy's verision is > 1.8. It also fixes an upcasting bug in `__div__` and `__truediv__` which was similar to the on described in [this issue](https://github.com/scipy/scipy/issues/2542) and fixed in [this PR](https://github.com/scipy/scipy/pull/2719).