3181b06a66ee5a2185f637e4072cc8e24d0801ec,dit/validate.py,,validate_outcomes,#Any#Any#,90
Before Change
// Make sure the outcomes are in the outcome space.
outcomes = set(outcomes)
sample_space = set(sample_space)
bad = outcomes.difference(sample_space)
L = len(bad)
if L > 0:
raise InvalidOutcome(bad, single=(L == 1))
After Change
// Make sure the outcomes are in the outcome space.
for outcome in outcomes:
if outcome not in sample_space:
raise InvalidOutcome(bad, single=True)
return True
def validate_pmf(pmf, ops):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: dit/dit
Commit Name: 3181b06a66ee5a2185f637e4072cc8e24d0801ec
Time: 2015-03-05
Author: chebee7i@gmail.com
File Name: dit/validate.py
Class Name:
Method Name: validate_outcomes
Project Name: ericmjl/pyjanitor
Commit Name: b5dca485575de7052f2ce8f39ea845e848e1ac89
Time: 2020-12-09
Author: samueloranyeli@gmail.com
File Name: janitor/functions.py
Class Name:
Method Name: fill_direction
Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 9def69a805132ff7549744b5b30a2fa7531fa405
Time: 2019-06-12
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/preprocess/_tmpreproc.py
Class Name: TMPreproc
Method Name: load_tokens_dataframe