def bitsToString(arr):
 s = array('c', ('.' * len(arr)))
 for i in xrange(len(arr)):
  if (arr[i] == 1):
   s[i] = '*'
 return s

def bitsToString ( arr ) : s = array ( 'c' , ( '.' * len ( arr ) ) ) for i in xrange ( len ( arr ) ) : if ( arr [ i ] == 1 ) : s [ i ] = '*' return s
returns a string representing a numpy array of 0s and 1s .