def _is_2D_matrix()

in python/mxboard/utils.py [0:0]


def _is_2D_matrix(matrix):
    """Checks to see if a ndarray is 2D or a list of lists is 2D"""
    return ((isinstance(matrix[0], list) and _rectangular(matrix) and
             not isinstance(matrix[0][0], list)) or
            (not isinstance(matrix, list) and matrix.shape == 2))