for func_index in range(len(unique_funcs) - 1):
    idx_func = idx_funcsort[unique_func_indices[func_index]:
        unique_func_indices[func_index + 1]]
func = func_table[unique_funcs[func_index]]
desired_output[idx_func] = func(abcissa_array[idx_func])
Efficient algorithm for evaluating a 1-d array of functions on a same-length 1d numpy array