def lin_from_row_col(row, col, sh):
    """
    Convert a col and row counter to 1D linear count
    """
    assert len(sh) == 2, 'Shape must be 2D'
    tot_rows = sh[0]
    ct = col * tot_rows + row
    return ct
