I am looking for a more efficient way to do the equivalent of
myarray * (2**arange(len(myarray))
Essentially I am after something like numpy.packbits that packs the bits into a single integer for any reasonable sized myarray yielding an appropriate size integer. I can implement this using numpy.packbits but I was wandering there is already a builtin that does this.
numpy.packbits?