I want to convert binary numpy array to decimal. Is there a similar function to this numpy.binary_repr
that works the other way around?
x = array([ 1., 1., 0., 1., 0., 0., 0., 1., 0.])
I know I can do this:
int("110100010",2) = 418
But here I need to extract the elements of the array and put them into string? Is there an easier way? if not, then how can I extract the elements of the array and create a string out of them?