def _parse_pi_par_names(self):
        """ private method to get the parameter names from prior information
        equations.  Sets a 'names' column in Pst.prior_information that is a list
        of parameter names


        """
        if self.prior_information.shape[0] == 0:
            return
        if "names" in self.prior_information.columns:
            self.prior_information.pop("names")
        if "rhs" in self.prior_information.columns:
            self.prior_information.pop("rhs")
        def parse(eqs):
            raw = eqs.split('=')
            rhs = float(raw[1])
            raw = [i for i in re.split('[###]',
                    raw[0].lower().strip().replace(' + ','###').replace(' - ','###')) if i != '']
            # in case of a leading '-' or '+'
            if len(raw[0]) == 0:
                raw = raw[1:]
            # pnames = []
            # for r in raw:
            #     if '*' not in r:
            #         continue
            #     pname =  r.split('*')[1].replace("log(", '').replace(')', '').strip()
            #     pnames.append(pname)
            # return pnames
            return [r.split('*')[1].replace("log(",'').replace(')','').strip() for r in raw if '*' in r]

        self.prior_information.loc[:,"names"] =\
            self.prior_information.equation.apply(lambda x: parse(x))
def _parse_pi_par_names ( self ) : if self . prior_information . shape [ 0 ] == 0 : return if "names" in self . prior_information . columns : self . prior_information . pop ( "names" ) if "rhs" in self . prior_information . columns : self . prior_information . pop ( "rhs" ) def parse ( eqs ) : raw = eqs . split ( '=' ) rhs = float ( raw [ 1 ] ) raw = [ i for i in re . split ( '[###]' , raw [ 0 ] . lower ( ) . strip ( ) . replace ( ' + ' , '###' ) . replace ( ' - ' , '###' ) ) if i != '' ] if len ( raw [ 0 ] ) == 0 : raw = raw [ 1 : ] return [ r . split ( '*' ) [ 1 ] . replace ( "log(" , '' ) . replace ( ')' , '' ) . strip ( ) for r in raw if '*' in r ] self . prior_information . loc [ : , "names" ] = self . prior_information . equation . apply ( lambda x : parse ( x ) )
private method to get the parameter names from prior information
        equations.  Sets a 'names' column in Pst.prior_information that is a list
        of parameter names