def a_vector_LP(m_dict, term_limit, term_lower_bound, diff_error=0.001, diff_step=0.001):
    'TODO: write docstring\n\n    '
    cnames = np.array([])
    for i in range(term_lower_bound, (term_limit + 1)):
        Y = m_dict['Y'].iloc[:, 0:i]
        z = m_dict['dataValues']['z']
        Y_neg = (- Y)
        new_Y = pd.DataFrame({'y1': Y.iloc[:, 0], 'y1_neg': Y_neg.iloc[:, 0]})
        for c in range(1, len(Y.iloc[0, :])):
            new_Y[('y' + str((c + 1)))] = Y.iloc[:, c]
            new_Y[(('y' + str((c + 1))) + '_neg')] = Y_neg.iloc[:, c]
        a = np.array([''.join(['a', str(i)])])
        cnames = np.append(cnames, a, axis=0)
        error_mat = np.array([])
        for j in range(1, (len(Y.iloc[:, 0]) + 1)):
            front_zeros = np.zeros((2 * (j - 1)))
            ones = [1, (- 1)]
            trail_zeroes = np.zeros((2 * (len(Y.iloc[:, 1]) - j)))
            if (j == 1):
                error_vars = np.append(ones, trail_zeroes)
            elif (j != 1):
                error_vars = np.append(front_zeros, ones)
                error_vars = np.append(error_vars, trail_zeroes)
            if (error_mat.size == 0):
                error_mat = np.append(error_mat, error_vars, axis=0)
            else:
                error_mat = np.vstack((error_mat, error_vars))
        new = pd.concat((pd.DataFrame(data=error_mat), new_Y), axis=1)
        diff_mat = diffMatMetalog(i, diff_step)
        diff_zeros = []
        for t in range(0, len(diff_mat.iloc[:, 0])):
            zeros_temp = np.zeros((2 * len(Y.iloc[:, 0])))
            if (np.size(diff_zeros) == 0):
                diff_zeros = zeros_temp
            else:
                diff_zeros = np.vstack((zeros_temp, diff_zeros))
        diff_mat = np.concatenate((diff_zeros, diff_mat), axis=1)
        lp_mat = np.concatenate((new, diff_mat), axis=0)
        c = np.append(np.ones((2 * len(Y.iloc[:, 1]))), np.zeros((2 * i)))
        A_eq = lp_mat[:len(Y.iloc[:, 1]), :]
        A_ub = ((- 1) * lp_mat[len(Y.iloc[:, 1]):, :])
        b_eq = z
        b_ub = ((- 1) * np.repeat(diff_error, len(diff_mat[:, 0])))
        lp_sol = linprog(c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq, method='simplex', options={'maxiter': 5000, 'tol': 1e-05, 'disp': False})
        tempLP = lp_sol.x[(2 * len(Y.iloc[:, 1])):(len(lp_sol.x) + 1)]
        temp = []
        for r in range(0, (len(tempLP) // 2)):
            temp.append((tempLP[(r * 2)] - tempLP[((2 * r) + 1)]))
    return temp
TODO: write docstring
def a_vector_LP(m_dict, term_limit, term_lower_bound, diff_error=0.001, diff_step=0.001):
    '\n\n    '
    cnames = np.array([])
    for i in range(term_lower_bound, (term_limit + 1)):
        Y = m_dict['Y'].iloc[:, 0:i]
        z = m_dict['dataValues']['z']
        Y_neg = (- Y)
        new_Y = pd.DataFrame({'y1': Y.iloc[:, 0], 'y1_neg': Y_neg.iloc[:, 0]})
        for c in range(1, len(Y.iloc[0, :])):
            new_Y[('y' + str((c + 1)))] = Y.iloc[:, c]
            new_Y[(('y' + str((c + 1))) + '_neg')] = Y_neg.iloc[:, c]
        a = np.array([.join(['a', str(i)])])
        cnames = np.append(cnames, a, axis=0)
        error_mat = np.array([])
        for j in range(1, (len(Y.iloc[:, 0]) + 1)):
            front_zeros = np.zeros((2 * (j - 1)))
            ones = [1, (- 1)]
            trail_zeroes = np.zeros((2 * (len(Y.iloc[:, 1]) - j)))
            if (j == 1):
                error_vars = np.append(ones, trail_zeroes)
            elif (j != 1):
                error_vars = np.append(front_zeros, ones)
                error_vars = np.append(error_vars, trail_zeroes)
            if (error_mat.size == 0):
                error_mat = np.append(error_mat, error_vars, axis=0)
            else:
                error_mat = np.vstack((error_mat, error_vars))
        new = pd.concat((pd.DataFrame(data=error_mat), new_Y), axis=1)
        diff_mat = diffMatMetalog(i, diff_step)
        diff_zeros = []
        for t in range(0, len(diff_mat.iloc[:, 0])):
            zeros_temp = np.zeros((2 * len(Y.iloc[:, 0])))
            if (np.size(diff_zeros) == 0):
                diff_zeros = zeros_temp
            else:
                diff_zeros = np.vstack((zeros_temp, diff_zeros))
        diff_mat = np.concatenate((diff_zeros, diff_mat), axis=1)
        lp_mat = np.concatenate((new, diff_mat), axis=0)
        c = np.append(np.ones((2 * len(Y.iloc[:, 1]))), np.zeros((2 * i)))
        A_eq = lp_mat[:len(Y.iloc[:, 1]), :]
        A_ub = ((- 1) * lp_mat[len(Y.iloc[:, 1]):, :])
        b_eq = z
        b_ub = ((- 1) * np.repeat(diff_error, len(diff_mat[:, 0])))
        lp_sol = linprog(c, A_ub=A_ub, b_ub=b_ub, A_eq=A_eq, b_eq=b_eq, method='simplex', options={'maxiter': 5000, 'tol': 1e-05, 'disp': False})
        tempLP = lp_sol.x[(2 * len(Y.iloc[:, 1])):(len(lp_sol.x) + 1)]
        temp = []
        for r in range(0, (len(tempLP) // 2)):
            temp.append((tempLP[(r * 2)] - tempLP[((2 * r) + 1)]))
    return temp