title: Building diagonal block matrix with some blocks as variable CVXPY
body: <p>I want to generate a (diagonal) block matrix (preferably sparse) in CVXPY. </p>
  
  <p>Some blocks can be <code>eye(m)</code> or anything but I have a block which is:</p>
  
  <pre><code>from cvxopt import *
  import cvxpy as cvx
  import numpy as np
  import scipy
  W = cvx.Variable(m,1)
  W_diag = cvx.diag(W)
  </code></pre>
  
  <p>Then I tried to form the block diagonal matrix with <code>W_diag</code> as a block, for instance, by:</p>
  
  <pre><code>T = scipy.sparse.block_diag((scipy.sparse.eye(m1).todense(), cvx.diag(W))
  </code></pre>
  
  <p>and I got the following error:</p>
  
  <blockquote>
    <p>TypeError: no supported conversion for types: (dtype('float64'), dtype('O'))</p>
  </blockquote>
  
  <p>What can I do? Other ways? I want to use matrix <code>T</code> in a constraint for CVXPY later on.</p>