title: Extract gurobi muti-dimensional variable value and form a numpy array
body: <p>I want to know that when I defined a multi-dimension variables in Gurobi, how can I extract all the value of the solution and organize them in to a Numpy array according to the original coordinate of the variable.</p>
  
  <p>I have the following decision variables defined in Gurobi using Python API:</p>
  
  <pre><code>for i in range(N):
    for t in range(M):
        Station_Size[i,t] = m.addVar(ub=Q, name = 'Station_Size_%s_%s' %(i,t))
        for j in range(N):
           Admission[i,j,t] = m.addVar(ub = Arrival_Rate[t,i,j], obj=-1, name = 'Admission_Rate_%s_%s_%s' %(i,j,t))
           Return[i,j,t] = m.addVar(name = 'Return_Rate_%s_%s_%s' %(i,j,t))
  </code></pre>
  
  <p>I have the problem solved and I have three dictionary:</p>
  
  <pre><code>Station_Size, Admission and Return
  </code></pre>
  
  <p>I know that the solution can be accessed as:</p>
  
  <pre><code>Station_Size[i,t].X, Admission[i,j,t].X and Return[i,j,t].X
  </code></pre>
  
  <p>I want to creat three Numpy array such that:</p>
  
  <pre><code>Array_Station_Size[i,t] = Station_Size[i,t].X
  Array_Admission[i,j,t] = Admission[i,j,t].X
  </code></pre>
  
  <p>I can definitely do this by creating three loops and creat the Numpy Array element by element. It's do-able if the loop doesn't take a lot of time. But I just want to know if there is a better way to do this. Please comment if  I did not make myself clear.</p>