コード例 #1
0
ファイル: design_info.py プロジェクト: thorstenkranz/patsy
 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)
コード例 #2
0
ファイル: design_info.py プロジェクト: aswizzl/luckybomb
 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)
コード例 #3
0
ファイル: design_info.py プロジェクト: chrish42/patsy
 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)
コード例 #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)
コード例 #5
0
ファイル: constraint.py プロジェクト: sunshe35/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.variable_names, self.coefs, self.constants])
コード例 #6
0
ファイル: parse_core.py プロジェクト: aswizzl/luckybomb
 def _repr_pretty_(self, p, cycle):
     return repr_pretty_impl(p, self, [self.type, self.token, self.args])
コード例 #7
0
ファイル: parse_core.py プロジェクト: aswizzl/luckybomb
 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)
コード例 #8
0
ファイル: desc.py プロジェクト: noelhx/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [list(self.factors)])
コード例 #9
0
ファイル: desc.py プロジェクト: 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])
コード例 #10
0
ファイル: desc.py プロジェクト: 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)])
コード例 #11
0
ファイル: desc.py プロジェクト: danieltaborda/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [list(self.factors)])
コード例 #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)
コード例 #13
0
ファイル: constraint.py プロジェクト: thorstenkranz/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.variable_names, self.coefs, self.constants])
コード例 #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)])
コード例 #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)])
コード例 #16
0
ファイル: contrasts.py プロジェクト: joaonatali/patsy
 def _repr_pretty_(self, p, cycle):
     repr_pretty_impl(p, self, [self.matrix, self.column_suffixes])
コード例 #17
0
ファイル: contrasts.py プロジェクト: grantnicholas/pytone
 def _repr_pretty_(self, p, cycle):
     repr_pretty_impl(p, self, [self.matrix, self.column_suffixes])
コード例 #18
0
ファイル: desc.py プロジェクト: danieltaborda/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)])
コード例 #19
0
ファイル: design_info.py プロジェクト: chrish42/patsy
 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)])
コード例 #20
0
ファイル: desc.py プロジェクト: danieltaborda/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])
コード例 #21
0
 def _repr_pretty_(self, p, cycle):
     return repr_pretty_impl(p, self, [self.type, self.token, self.args])
コード例 #22
0
ファイル: design_info.py プロジェクト: chrish42/patsy
 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)])