title: Creating a 2d numpy array to hold characters
body: <p>I have the following numpy array and previous set up that has a word queue and a temporary variable 'temp' to store a word. This word needs to be "put", letter by letter, into the numpy 2d array:</p>
  
  <pre><code>from collections import deque
  import numpy as np 
  message=input("Write a message:")
  wordqueue=message.split()
  queue=deque(wordqueue)
  print(wordqueue)
  
  for i in range(1):
    temp=wordqueue.pop(0) #store the removed item in the temporary variable 'temp'
  print(wordqueue)
  print(temp)
  display = np.zeros((4,10)) #create a 2d array that is to store the words from the queue
  print(display)
  display[0, 0] = temp #add the word from the temp variable to fill the array (each character in each sequential position in the array)
  print(display)
  </code></pre>
  
  <p>Unfortunately, the output is as follows: </p>
  
  <pre><code>Write a message: This is a message for the display array
  ['This', 'is', 'a', 'message', 'for', 'the', 'display', 'array']
  ['is', 'a', 'message', 'for', 'the', 'display', 'array']
  This
  [[ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
   [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
   [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]
   [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]]
  Traceback (most recent call last):
    File "python", line 20, in &lt;module&gt;
  ValueError: could not convert string to float: 'This'
  </code></pre>
  
  <p>I did try to define the 2d array and define the data type, but that too wasn't very obvious and I kept getting various errors.</p>
  
  <p>What I would like help with is the following: 
  1. Ideally, I would like the numpy array to be set up with "*"s instead of zeros/ones (the documentation didn't help with this setup). 
  2. Replace the *s in the array with the temp variable. One letter for each *</p>
  
  <p>EXAMPLE:</p>
  
  <p>Display array:
   (4 x 20) </p>
  
  <pre><code>* * * * * * * * * * * * * * * * * * * *
  * * * * * * * * * * * * * * * * * * * *
  * * * * * * * * * * * * * * * * * * * *
  * * * * * * * * * * * * * * * * * * * *
  </code></pre>
  
  <p>Enter Message: This is a test message
  temp: This</p>
  
  <p>Updated display would show:</p>
  
  <pre><code>t h i s * * * * * * * * * * * * * * * *
  * * * * * * * * * * * * * * * * * * * *
  * * * * * * * * * * * * * * * * * * * *
  * * * * * * * * * * * * * * * * * * * *
  </code></pre>
  
  <p>for subsequent words, it would then populate the array (truncating if the word was too big and going to the next line if necessary)</p>
  
  <p>So far:
  <a href="https://repl.it/IcJ3/7" rel="nofollow noreferrer">https://repl.it/IcJ3/7</a></p>
  
  <p>I tried this, for instance, to create the char array:</p>
  
  <pre><code>display = np.chararray((4,10)) #create a 2d array that is to store the letters in the words from the queue
  display[:]="*"
  </code></pre>
  
  <p>but it produced this, with the erroneous "b" inserted. Cannot see why ...</p>
  
  <pre><code>[[b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*']
   [b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*']
   [b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*']
   [b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*' b'*']]
  </code></pre>
  
  <p>Updated (working on )repl.it here:
  <a href="https://repl.it/IcJ3/8" rel="nofollow noreferrer">https://repl.it/IcJ3/8</a></p>