title: Converting integer array to binary array in python
body: <p>I am trying to convert an array with integers to binary, using python 2.7.</p>
  <p>A simplified version of my code is the following:</p>
  <pre><code> #!/usr/bin/python
   import numpy as np
  
   a=np.array([6,1,5,0,2])
   b=np.array(np.zeros((5)))
  
  for i in range(10):
      b[i]=bin(int(a[i])).zfill(8)
  </code></pre>
  <p>The code gives me the error message:</p>
  <pre><code>b[i]=bin(int(a[i])).zfill(8)
  ValueError: invalid literal for float(): 0000b110
  </code></pre>
  <p>What is wrong with my code?
  Is there another way to do this?
  The original code is part of a much greater project with 2 dimensional arrays.</p>
  <p>p.s I'm a relative novice to Python</p>