def matrixAsList(matrix, value=True):
    rows, cols = len(matrix), len(matrix[0])
    cells = []
    for row in range(rows):
        for col in range(cols):
            if matrix[row][col] == value:
                cells.append((row, col))
    return cells
Shorcut for building the form instance of given form class
dataset/ETHPy150Open rlpy/rlpy/rlpy/Domains/PacmanPackage/util.py/matrixAsList--crossover with--dataset/ETHPy150Open slav0nic/djangobb/djangobb_forum/util.py/build_form