def most_square_shape(N):
    """
    Return a rectangle (height, width) with area N that is closest to square.

    Parameters
    ----------
    N : int
        WRITEME

    Returns
    -------
    WRITEME
    """
    for i in xrange(int(numpy.sqrt(N)),0, -1):
        if 0 == N % i:
            return (i, N/i)
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/packaged_dependencies/theano_linear/imaging.py/most_square_shape/original