Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import numpy as np import pandas as pd from tqdm import tqdm from bilby.core.utils import logger from bilby.core.likelihood import Likelihood from bilby.hyper.model import Model from .cupy_utils import CUPY_LOADED, to_numpy, xp INF = xp.nan_to_num(xp.inf) class HyperparameterLikelihood(Likelihood): """ A likelihood for inferring hyperparameter posterior distributions with including selection effects. See Eq. (34) of https://arxiv.org/abs/1809.02293 for a definition. Parameters ---------- posteriors: list An list of pandas data frames of samples sets of samples. Each set may have a different size. hyper_prior: `bilby.hyper.model.Model` The population model, this can alternatively be a function. sampling_prior: `bilby.hyper.model.Model` The sampling prior, this can alternatively be a function. log_evidences: list, optional