Esempio n. 1
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     if self.term_slices is None:
         kwargs = [("term_name_slices", self.term_name_slices)]
     else:
         kwargs = [("term_slices", self.term_slices)]
     if self.builder is not None:
         kwargs.append(("builder", self.builder))
     repr_pretty_impl(p, self, [self.column_names], kwargs)
Esempio n. 2
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     if self.term_slices is None:
         kwargs = [("term_name_slices", self.term_name_slices)]
     else:
         kwargs = [("term_slices", self.term_slices)]
     if self.builder is not None:
         kwargs.append(("builder", self.builder))
     repr_pretty_impl(p, self, [self.column_names], kwargs)
Esempio n. 3
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     class FactorState(object):
         def __repr__(self):
             return "<factor state>"
     kwlist = [("factor", self.factor),
               ("type", self.type),
               # Don't put the state in people's faces, it will
               # just encourage them to pay attention to the
               # contents :-). Plus it's a bunch of gobbledygook
               # they don't care about. They can always look at
               # self.state if they want to know...
               ("state", FactorState()),
               ]
     if self.type == "numerical":
         kwlist.append(("num_columns", self.num_columns))
     else:
         kwlist.append(("categories", self.categories))
     repr_pretty_impl(p, self, [], kwlist)
Esempio n. 4
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     class FactorState(object):
         def __repr__(self):
             return "<factor state>"
     kwlist = [("factor", self.factor),
               ("type", self.type),
               # Don't put the state in people's faces, it will
               # just encourage them to pay attention to the
               # contents :-). Plus it's a bunch of gobbledygook
               # they don't care about. They can always look at
               # self.state if they want to know...
               ("state", FactorState()),
               ]
     if self.type == "numerical":
         kwlist.append(("num_columns", self.num_columns))
     else:
         kwlist.append(("categories", self.categories))
     repr_pretty_impl(p, self, [], kwlist)
Esempio n. 5
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.variable_names, self.coefs, self.constants])
Esempio n. 6
0
 def _repr_pretty_(self, p, cycle):
     return repr_pretty_impl(p, self, [self.type, self.token, self.args])
Esempio n. 7
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     kwargs = []
     if self.extra is not None:
         kwargs = [("extra", self.extra)]
     return repr_pretty_impl(p, self, [self.type, self.origin], kwargs)
Esempio n. 8
0
File: desc.py Progetto: noelhx/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [list(self.factors)])
Esempio n. 9
0
File: desc.py Progetto: noelhx/patsy
 def _pretty_repr_(self, p, cycle): # pragma: no cover
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.intercept, self.intercept_origin,
                              self.intercept_removed, self.terms])
Esempio n. 10
0
File: desc.py Progetto: noelhx/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [],
                             [("lhs_termlist", self.lhs_termlist),
                              ("rhs_termlist", self.rhs_termlist)])
Esempio n. 11
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [list(self.factors)])
Esempio n. 12
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     kwargs = []
     if self.extra is not None:
         kwargs = [("extra", self.extra)]
     return repr_pretty_impl(p, self, [self.type, self.origin], kwargs)
Esempio n. 13
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.variable_names, self.coefs, self.constants])
Esempio n. 14
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self,
                      [self.column_names],
                      [("factor_infos", self.factor_infos),
                       ("term_codings", self.term_codings)])
Esempio n. 15
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [],
                      [("factors", self.factors),
                       ("contrast_matrices", self.contrast_matrices),
                       ("num_columns", self.num_columns)])
Esempio n. 16
0
 def _repr_pretty_(self, p, cycle):
     repr_pretty_impl(p, self, [self.matrix, self.column_suffixes])
Esempio n. 17
0
 def _repr_pretty_(self, p, cycle):
     repr_pretty_impl(p, self, [self.matrix, self.column_suffixes])
Esempio n. 18
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [],
                             [("lhs_termlist", self.lhs_termlist),
                              ("rhs_termlist", self.rhs_termlist)])
Esempio n. 19
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [],
                      [("factors", self.factors),
                       ("contrast_matrices", self.contrast_matrices),
                       ("num_columns", self.num_columns)])
Esempio n. 20
0
 def _pretty_repr_(self, p, cycle): # pragma: no cover
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.intercept, self.intercept_origin,
                              self.intercept_removed, self.terms])
Esempio n. 21
0
 def _repr_pretty_(self, p, cycle):
     return repr_pretty_impl(p, self, [self.type, self.token, self.args])
Esempio n. 22
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self,
                      [self.column_names],
                      [("factor_infos", self.factor_infos),
                       ("term_codings", self.term_codings)])