Remove runtime dependency on SciPy
rgommers opened this issue · comments
Right now scipy
is a hard dependency, but all it's used for is to do a few isinstance
checks. A dependency is undesirable here both because it's heavy and because it's a bit circular when testing PyData Sparse support in the SciPy test suite. sparse
should work without scipy
installed.
It shouldn't be too difficult to get rid of this; the isinstance
checks could use something like this instead:
def _is_scipy_sparse_obj(x): # supports sparse arrays and matrices
if hasattr(x, '__class__') and `x.__class__.startswith('scipy.sparse'):
return True
return False
That sounds like a low-hanging fruit indeed.