title: Assign a the value of a sparse matrix to numpy array
body: <pre><code>import numpy as np
  import scipy.sparse as scsp
  from scipy.sparse import csr_matrix,lil_matrix
  
  # create an empty numpy matrix
  wi=np.empty((num_clusters*num_cluster_neurons, input))   
  for i in range(num_clusters*num_cluster_neurons):         
      temp_neuron_prob=dic_cluster_prob[dic_neuron_cluster[i]]
  
      #create 1*input shape sparse matrix according to probability
      lil=lil_matrix(scsp.rand(1, input, temp_neuron_prob))
  
      #want to assign the 1*input sparse matrix to one slice of the numpy matrix
      wi[i,:]=lil[:]
  </code></pre>
  
  <p>I tried to assign the value of a lil_matrix to one slice of numpy array, but it gives the error 'setting an array element with a sequence'</p>
  
  <p>I want to know why comes this error because they have the same size and how could I do to improve efficiency, since numpy array is faster than sparse matrix(lil_matrix).</p>
  
  <p><strong>I want to use numpy array to have the values created by the sparse matrix</strong></p>