code: def scipy_sparse_to_spmatrix(A):
      
      coo = A.tocoo()
      SP = spmatrix(coo.data.tolist(), coo.row.tolist(), coo.col.tolist(), size=A.shape)
      return SP
docs: Efficient conversion from scipy sparse matrix to cvxopt sparse matrix