def generate_obs_features(t, m, e, features_to_compute=FEATURES_LIST):
    """Generate features dict from given time-series data.

    Parameters
    ----------
    t : array_like
        Array containing time values.

    m : array_like
        Array containing data values.

    e : array_like
        Array containing measurement error values.

    features_to_compute : list
        Optional list containing names of desired features.

    Returns
    -------
    dict
        Dictionary containing generated time series features.
    """
    features_to_compute = [f for f in features_to_compute
                           if FEATURES_LIST in f]
    feature_graph = {
        'n_epochs': (len, t),
        'avg_err': (np.mean, e),
        'med_err': (np.median, e),
        'std_err': (np.std, e),
        'total_time': (lambda x: np.max(x) - np.min(x), t),
        'avgt': (np.mean, t),
        'cads': (np.diff, t),
        'cads_std': (np.std, 'cads'),
        'avg_mag': (np.mean, m),
        'cads_avg': (np.mean, 'cads'),
        'cads_med': (np.median, 'cads'),
        'cad_probs_1': (cad_prob, 'cads', 1),
        'cad_probs_10': (cad_prob, 'cads', 10),
        'cad_probs_20': (cad_prob, 'cads', 20),
        'cad_probs_30': (cad_prob, 'cads', 30),
        'cad_probs_40': (cad_prob, 'cads', 40),
        'cad_probs_50': (cad_prob, 'cads', 50),
        'cad_probs_100': (cad_prob, 'cads', 100),
        'cad_probs_500': (cad_prob, 'cads', 500),
        'cad_probs_1000': (cad_prob, 'cads', 1000),
        'cad_probs_5000': (cad_prob, 'cads', 5000),
        'cad_probs_10000': (cad_prob, 'cads', 10000),
        'cad_probs_50000': (cad_prob, 'cads', 50000),
        'cad_probs_100000': (cad_prob, 'cads', 100000),
        'cad_probs_500000': (cad_prob, 'cads', 500000),
        'cad_probs_1000000': (cad_prob, 'cads', 1000000),
        'cad_probs_5000000': (cad_prob, 'cads', 5000000),
        'cad_probs_10000000': (cad_prob, 'cads', 10000000),
        'double_to_single_step': (double_to_single_step, 'cads'),
        'avg_double_to_single_step': (np.mean, 'double_to_single_step'),
        'med_double_to_single_step': (np.median, 'double_to_single_step'),
        'std_double_to_single_step': (np.std, 'double_to_single_step'),
        'delta_t_hist': (delta_t_hist, t),
        'delta_t_nhist': (normalize_hist, 'delta_t_hist', 'total_time'),
        'nhist_peaks': (find_sorted_peaks, 'delta_t_nhist'),
        'all_times_hist_peak_val': (np.max, 'delta_t_hist'),
        # Can't JSON serialize np.int64 under Python3 (yet?), cast as int first
        'all_times_hist_peak_bin': (lambda x: int(np.argmax(x)),
                                    'delta_t_hist'),
        'all_times_nhist_numpeaks': (len, 'nhist_peaks'),
        'all_times_nhist_peak_val': (np.max, 'delta_t_nhist'),
        'all_times_nhist_peak_1_to_2': (peak_ratio, 'nhist_peaks', 1, 2),
        'all_times_nhist_peak_1_to_3': (peak_ratio, 'nhist_peaks', 1, 3),
        'all_times_nhist_peak_2_to_3': (peak_ratio, 'nhist_peaks', 2, 3),
        'all_times_nhist_peak_1_to_4': (peak_ratio, 'nhist_peaks', 1, 4),
        'all_times_nhist_peak_2_to_4': (peak_ratio, 'nhist_peaks', 2, 4),
        'all_times_nhist_peak_3_to_4': (peak_ratio, 'nhist_peaks', 3, 4),
        'all_times_nhist_peak1_bin': (peak_bin, 'nhist_peaks', 1),
        'all_times_nhist_peak2_bin': (peak_bin, 'nhist_peaks', 2),
        'all_times_nhist_peak3_bin': (peak_bin, 'nhist_peaks', 3),
        'all_times_nhist_peak4_bin': (peak_bin, 'nhist_peaks', 4)
    }

    # Do not execute in parallel; parallelization has already taken place at
    # the level of time series, so we compute features for a single time series
    # in serial.
    values = dask.async.get_sync(feature_graph, features_to_compute)
    return dict(zip(features_to_compute, values))
dataset/ETHPy150Open cesium-ml/cesium/cesium/obs_feature_tools.py/generate_obs_features/swapped operands of `in`