def get_values(self):
        """
        Add Table to XMLBIF.

        Return
        ---------------
        dict: dict of type {variable: table tag}

        Examples
        -------
        >>> writer = XMLBIFWriter(model)
        >>> writer.get_values()
        {'dog-out': <Element TABLE at 0x7f240726f3c8>,
         'light-on': <Element TABLE at 0x7f240726f488>,
         'bowel-problem': <Element TABLE at 0x7f240726f388>,
         'family-out': <Element TABLE at 0x7f240726f408>,
         'hear-bark': <Element TABLE at 0x7f240726f448>}
        """
        cpds = self.model.get_cpds()
        definition_tag = self.definition
        table_tag = {}
        for cpd in cpds:
            table_tag[cpd.variable] = etree.SubElement(definition_tag[cpd.variable], "TABLE")
            table_tag[cpd.variable].text = ''
            for val in cpd.get_values().ravel(order="F"):
                table_tag[cpd.variable].text += str(val) + ' '

        return table_tag
def get_values ( self ) : cpds = self . model . get_cpds ( ) definition_tag = self . definition table_tag = { } for cpd in cpds : table_tag [ cpd . variable ] = etree . SubElement ( definition_tag [ cpd . variable ] , "TABLE" ) table_tag [ cpd . variable ] . text = '' for val in cpd . get_values ( ) . ravel ( order = "F" ) : table_tag [ cpd . variable ] . text += str ( val ) + ' ' return table_tag
Add Table to XMLBIF.

        Return
        ---------------
        dict: dict of type {variable: table tag}

        Examples
        -------
        >>> writer = XMLBIFWriter(model)
        >>> writer.get_values()
        {'dog-out': <Element TABLE at 0x7f240726f3c8>,
         'light-on': <Element TABLE at 0x7f240726f488>,
         'bowel-problem': <Element TABLE at 0x7f240726f388>,
         'family-out': <Element TABLE at 0x7f240726f408>,
         'hear-bark': <Element TABLE at 0x7f240726f448>}