title: How to insert words in a numpy multidimensional array?
body: <p>I need to put in a matrix some words that are taken from a list, based on their indices.
  My code is the following:</p>
  
  <pre><code>for i in range(no_of_lines):
      for j in range(no_of_lines):
          cuv_matrix[i][j] = cuv_list[mat_index[i][j]]
  </code></pre>
  
  <p>cuv_list is the list of words, and mat_index contains the indices that correspond to the ones in the cuv_list</p>
  
  <p>The cuv_matrix actual output is this:</p>
  
  <pre><code>[['\x88' 'M' '\x93' ..., '6' '4' '1']
   ['2' '8' '3' ..., '0' '1' '6']
   ['0' '3' '2' ..., '.' '0' '0']
   ..., 
   ['\xff' '\xff' '\xff' ..., '' '0' '.']
   ['0' '' '0' ..., '' '0' '.']
   ['0' '' '0' ..., '0' '.' '0']]
  </code></pre>
  
  <p>The way I declared cuv_matrix: </p>
  
  <pre><code>cuv_matrix = numpy.chararray((no_of_lines, no_of_lines))
  </code></pre>
  
  <p>What am I doing wrong and how can I get each element of the matrix to be a word, like this?</p>
  
  <p>Expected output:</p>
  
  <pre><code>[[movie film ..., actor]
        ... ...
  character seen ..., director]]
  </code></pre>
  
  <p>Later on, I need to access the words from the matrix using their coordinates.</p>
  
  <p>Thanks in advance!</p>