def test_normalize_hist():
    """Test normalization of histogram."""
    times, values, errors = irregular_random()
    delta_ts = [pair[1] - pair[0] for pair in itertools.combinations(times, 2)]
    nbins = 50
    bins = np.linspace(0, min(times) - max(times), nbins+1)
    nhist = oft.normalize_hist(oft.delta_t_hist(times, nbins), max(times) -
                               min(times))
    npt.assert_allclose(nhist, np.histogram(delta_ts,
        bins=bins, density=True)[0])
dataset/ETHPy150Open cesium-ml/cesium/cesium/tests/test_obs_features.py/test_normalize_hist/swapped operands of `-`