title: How to convert row list to column list
body: <p>How do you convert <code>[1, 2, 3]</code> to <code>[[1],[2],[3]]</code> in python? </p>
  
  <p>Also, say I have a vector of length m with values ranging from 1 to 10, I want to create a matrix of size mx10 such that say if vector <code>y = 1</code> then the matrix should be <code>[0,1,0,0,0,0,0,0,0,0]</code>. In octave it was possible with, </p>
  
  <pre><code>y_train = zeros(m,output_layer_size);
  for i=1:output_layer_size
     y_train(find(y==i),i)=1;
  end
  </code></pre>
  
  <p>But similar function gives out <code>VisibleDeprecationWarning</code> warning in python and does give desired output</p>
  
  <pre><code>y_train = np.zeros((y.shape[0],10))
  for i in range(10):
      y_train[y==i][i]=1
  </code></pre>