def get_box_index(i_cur, j_cur, i_max, j_max):
    """ Return the location of the box (index n) in the design array.
    Args:
        i_cur(int or float):  index of box in x direction
        j_cur(int or float):  index of box in y direction

    Returns:
        n(int):               index of box in design_array
                              '-1' if i_cur and j_cur are '-1'
    """
    if ((i_cur == -1) and (j_cur == -1)):
        n = -1
    else:
        n = i_cur * (j_max + 1) + j_cur - 1  # index starts with zero
    return int(n)