def test_param(self): ctxs = [RuptureContext([('occurrence_rate', .001)]), RuptureContext([('occurrence_rate', .002)])] for poe in (.1, .5, .9): c1, pnes1 = compose(ctxs, poe) c2, pnes2 = compose(_collapse(ctxs), poe) aac(c1, c2) # the same
def test_mixed(self): ctxs = [RuptureContext([('occurrence_rate', .001)]), RuptureContext([('occurrence_rate', .002)]), RuptureContext([('occurrence_rate', numpy.nan), ('probs_occur', [.999, .001])]), RuptureContext([('occurrence_rate', numpy.nan), ('probs_occur', [.998, .002])])] for poe in (.1, .5, .9): c1, pnes1 = compose(ctxs, poe) c2, pnes2 = compose(_collapse(ctxs), poe) aac(c1, c2) # the same