Martin Albrecht points out that my stringification is a waste:

ZZ(A,2)

works fine.

On Tue, Aug 23, 2011 at 12:29 PM, Tom Boothby <tomas.boot...@gmail.com> wrote:
> Treat it as a binary number:
>
> s = ''.join(str(i) for i in A)
> ZZ(s, base=2)
>
> On Tue, Aug 23, 2011 at 12:08 PM, Santanu Sarkar
> <sarkar.santanu....@gmail.com> wrote:
>> Let A=(1,1,0,0,0,1) be an binary array. How efficiently can we calculate the
>> corresponding integer?
>>
>> --
>> To post to this group, send email to sage-support@googlegroups.com
>> To unsubscribe from this group, send email to
>> sage-support+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/sage-support
>> URL: http://www.sagemath.org
>>
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to