Skip to content

update bounded KDE class

Hi @charlie.hoy I noticed the following warning about the bounded KDE and decided to change the internals to use the recommended class in the defaults throughout.

/home/colm.talbot/.conda/envs/convergence/lib/python3.8/site-packages/pesummary/utils/decorators.py:274: UserWarning: The Bounded_1d_kde class has changed its name to ReflectionBoundedKDE. Bounded_1d_kde may not be supported in future releases. Please update.

For reference, these are the occurrences that I changed.

$ grep Bounded_1d_kde pesummary/**.py                                                                                                
pesummary/cli/summaryjscompare.py:from pesummary.core.plots.bounded_1d_kde import Bounded_1d_kde
pesummary/cli/summaryjscompare.py:            jensen_shannon_divergence([bootA, bootB], kde=Bounded_1d_kde, xlow=xlow, xhigh=xhigh)
pesummary/core/plots/bounded_1d_kde.py:            raise TypeError("Bounded_1d_kde can only be one-dimensional")
pesummary/core/plots/bounded_1d_kde.py:class Bounded_1d_kde(ReflectionBoundedKDE):
pesummary/core/plots/bounded_1d_kde.py:        "The Bounded_1d_kde class has changed its name to ReflectionBoundedKDE. "
pesummary/core/plots/bounded_1d_kde.py:        "Bounded_1d_kde may not be supported in future releases. Please update."
pesummary/core/plots/bounded_1d_kde.py:        return super(Bounded_1d_kde, self).__init__(*args, **kwargs)
pesummary/core/plots/bounded_1d_kde.py:    "Bounded_1d_kde": Bounded_1d_kde
pesummary/gw/plots/main.py:from pesummary.core.plots.bounded_1d_kde import Bounded_1d_kde
pesummary/gw/plots/main.py:        preliminary=False, checkpoint=False, kde=Bounded_1d_kde,
pesummary/gw/webpage/main.py:        from pesummary.core.plots.bounded_1d_kde import Bounded_1d_kde
pesummary/gw/webpage/main.py:            param, samples, kde=Bounded_1d_kde, xlow=xlow, xhigh=xhigh
pesummary/tests/bounded_kde_test.py:from pesummary.core.plots.bounded_1d_kde import Bounded_1d_kde, bounded_1d_kde
pesummary/tests/bounded_kde_test.py:    """Test the Bounded_1d_kde function
pesummary/tests/bounded_kde_test.py:        bounded = Bounded_1d_kde(samples, xlow=x_low, xhigh=x_high)
pesummary/tests/utils_test.py:    from pesummary.core.plots.bounded_1d_kde import Bounded_1d_kde
pesummary/tests/utils_test.py:        samples, decimal=9, kde=Bounded_1d_kde, xlow=4.5, xhigh=5.5
pesummary/tests/webpage_test.py:        from pesummary.core.plots.bounded_1d_kde import Bounded_1d_kde
pesummary/tests/webpage_test.py:                Bounded_1d_kde(samples[0], xlow=xlow, xhigh=xhigh)(x),
pesummary/tests/webpage_test.py:                Bounded_1d_kde(samples[1], xlow=xlow, xhigh=xhigh)(x)
pesummary/utils/utils.py:    from pesummary.core.plots.bounded_1d_kde import Bounded_1d_kde
pesummary/utils/utils.py:    prior_KDE = Bounded_1d_kde(prior_samples)
pesummary/utils/utils.py:    posterior_KDE = Bounded_1d_kde(posterior_samples)

Merge request reports

Loading