title: Vectorized conversion of decimal integer array to binary array in numpy
body: <p>I'm trying to convert an array of integers into their binary representations in python. I know that native python has a function called <code>bin</code> that does this. Numpy also has a similar function: <code>numpy.binary_repr</code>. </p>
  
  <p>The problem is that none of these are <strong>vectorized</strong> approaches, as in, they only take one single value at a time. So, in order for me to convert a whole array of inputs, I have to use a for-loop and call these functions multiple times, which isn't very efficient.</p>
  
  <p>Is there any way to perform this conversion without for-loops? Are there any vectorized forms of these functions? I've tried <code>numpy.apply_along_axis</code> but no luck. I've also tried using <code>np.fromiter</code> and <code>map</code> and it was also a no go.</p>
  
  <p>I know similar questions have been asked a few other times (like <a href="https://stackoverflow.com/questions/36138379/converting-integer-array-to-binary-array-in-python">here</a>), but none of the answers given are actually vectorized.</p>
  
  <p>Pointing me into any direction would be greatly appreciated!</p>
  
  <p>Thanks =)</p>