I have a binary array, and I would like to convert it into a list of integers, where each int is a row of the array.
For example:
from numpy import *
I once asked a similar question here. Here was my answer, adapted for your question:
def bool2int(x): y = 0 for i,j in enumerate(x): y += j<