def get_data(data_frame, features, label):
    """
    Purpose: Extract features and prepare a feature matrix
             Set the first feature x0 = 1
    Input  : Original Dataframe, list of feature variables, output variable
    Output : Feature matrix, label array
    """
    data_frame['constant'] = 1.0
    features = ['constant'] + features
    features_matrix = data_frame[features].to_numpy()
    if label != None:
        label_array = data_frame[label].to_numpy()
    else:
        label_array = []
    return(features_matrix, label_array)