import numpy as np

a = np.random.randint(2, size=30)
print a


chunks = [a[x:x+6] for x in xrange(0, len(a), 6)]
ya = chunks[0]


def bin2int(l):
    """ convert list of binary strings l into list of int ll """

    ll = []    
    
    for item in l:
        ll.append(int(item, 2))

    return ll
    
#def array_bin2int(a):
#    """ convert the 30 bit long array generated by IBEA into a list of int """

bin2int(chunks[0])

#yo = []
    
#for i in chunks:
#    yo.append(bin2int(i))
#    
#print yo