def sympy_to_scipy_sparse(m, **options):
    if not np or not sparse:
        raise ImportError
    dtype = options.get('dtype', 'complex')
    if isinstance(m, Matrix):
        return sparse.csr_matrix(np.matrix(m.tolist(), dtype=dtype))
    elif isinstance(m, Expr):
        if m.is_Number or m.is_NumberSymbol or m == I:
            return complex(m)
    raise TypeError('Expected Matrix or complex scalar, got: %r' % m)
Determine if the named feature is enabled for the current request.
dataset/ETHPy150Open sympy/sympy/sympy/physics/quantum/matrixutils.py/sympy_to_scipy_sparse--crossover with--dataset/ETHPy150Open hypothesis/h/h/features/client.py/Client.enabled