def test_roundtrip_from_pyjags_via_arviz_to_pyjags(): arviz_inference_data_from_pyjags_samples_dict = from_pyjags( PYJAGS_POSTERIOR_DICT) arviz_dict_from_idata_from_pyjags_dict = _extract_arviz_dict_from_inference_data( arviz_inference_data_from_pyjags_samples_dict) pyjags_dict_from_arviz_idata = _convert_arviz_dict_to_pyjags_dict( arviz_dict_from_idata_from_pyjags_dict) assert verify_equality_of_numpy_values_dictionaries( PYJAGS_POSTERIOR_DICT, pyjags_dict_from_arviz_idata)
def test_extract_samples_dictionary_from_arviz_inference_data(): arviz_samples_dict_from_pyjags_samples_dict = _convert_pyjags_dict_to_arviz_dict( PYJAGS_POSTERIOR_DICT) arviz_inference_data_from_pyjags_samples_dict = from_pyjags( PYJAGS_POSTERIOR_DICT) arviz_dict_from_idata_from_pyjags_dict = _extract_arviz_dict_from_inference_data( arviz_inference_data_from_pyjags_samples_dict) assert verify_equality_of_numpy_values_dictionaries( arviz_samples_dict_from_pyjags_samples_dict, arviz_dict_from_idata_from_pyjags_dict, )