def get_train_test_ind(flat_years, flat_states, train_state, continental, DC):
    train_inds = (start_train_year >= flat_years) & (flat_years < end_train_year)
    test_inds  = (flat_years >= end_train_year)

    if train_state is not None:
        train_inds &= (flat_states == train_state)
        test_inds &= (flat_states == train_state)

    if continental:
        not_AK = np.array([st.upper() != "AK" for st in flat_states])
        train_inds &= not_AK
        test_inds  &= not_AK

        not_HI = np.array([st.upper() != "HI" for st in flat_states])
        train_inds &= not_HI
        test_inds  &= not_HI

    if not DC:
        not_DC = np.array([st.upper() != "DC" for st in flat_states])
        train_inds &= not_DC
        test_inds  &= not_DC

    return train_inds, test_inds


#############
#  fitting  #
#############
dataset/ETHPy150Open HIPS/pgmult/experiments/census_gp.py/get_train_test_ind/swapped operands of `>=`