Module ImportFrom alias Assign NameStore ListLoad Str Str Str Str Import alias Import alias Import alias Import alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareNotIn AttributeLoad NameLoad attr ListLoad Str Str body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr Str body If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str orelse Assert CompareEq AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assert UnaryOpNot NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return Str decorator_list decorator_list Assign NameStore ListLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str Call NameLoad If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad ListLoad NameLoad decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Str Str Dict Str Num keyword Num Assert CompareEq AttributeLoad NameLoad attr Str Assert CompareEq AttributeLoad NameLoad attr Dict Str Num Assert CompareEq AttributeLoad NameLoad attr Str Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareIs AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad Assign NameStore Call NameLoad Str Str Dict Str Num keyword ListLoad Str Str Assert CompareEq AttributeLoad NameLoad attr Str Assert CompareEq AttributeLoad NameLoad attr Dict Str Num Assert CompareEq AttributeLoad NameLoad attr Str Assert CompareIs AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr TupleLoad Str Str Expr Call NameLoad NameLoad ImportFrom alias Expr Call NameLoad NameLoad NameLoad Str Str Dict Expr Call NameLoad NameLoad NameLoad Str Str Dict Expr Call NameLoad NameLoad NameLoad Str Str Dict keyword Str Expr Call NameLoad NameLoad NameLoad Str Str Dict keyword Num keyword Num Expr Call NameLoad NameLoad NameLoad Str Str Dict Expr Call NameLoad NameLoad NameLoad Str Str Dict keyword Num Expr Call NameLoad NameLoad NameLoad Str Str Dict keyword Num If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Str Str Dict Str Num keyword Call NameLoad Num Assert CompareEq AttributeLoad NameLoad attr Num decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot Call NameLoad NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assert UnaryOpNot NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad ListLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num ListLoad Str Str Assign NameStore Call NameLoad ListLoad Str Str Dict Str NameLoad Num Assert CompareEq AttributeLoad NameLoad attr TupleLoad Str Str Assert CompareEq AttributeLoad NameLoad attr Dict Str NameLoad Assert CompareEq AttributeLoad NameLoad attr Num If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call NameLoad ListLoad Str Str Dict Str NameLoad Call NameLoad Num Assert CompareEq AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad ImportFrom alias Expr Call NameLoad NameLoad NameLoad Num Dict Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Num Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Dict Str NameLoad Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Dict Str Num Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Dict Num decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad If CompareNotEq CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr For NameStore NameLoad body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotEq NameLoad Call NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If UnaryOpNot Call NameLoad NameLoad NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad If CompareNotEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body For NameStore NameLoad body Assign NameStore Num Assign NameStore Call NameLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareEq AttributeLoad NameLoad attr Str body AugAssignMult NameStore AttributeLoad NameLoad attr orelse Assert CompareEq AttributeLoad NameLoad attr Str Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num Call NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignMult NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareNotEq NameLoad Call NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareNotEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareIs NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore NameLoad Assign NameStore ListComp Call NameLoad NameLoad BinOpAdd NameLoad Num comprehension NameStore Call NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad NameLoad NameLoad orelse Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Num For NameStore NameLoad body AugAssignAdd NameStore AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call NameLoad NameLoad BinOpAdd NameLoad NameLoad AugAssignAdd NameStore NameLoad If CompareNotEq NameLoad Call NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad ListComp TupleLoad Call AttributeLoad NameLoad attr NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareIsNot AttributeLoad NameLoad attr NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assert CompareEq Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Num For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assert CompareEq NameLoad NameLoad Assert CompareEq NameLoad Num Assign NameStore NameLoad Assert CompareEq NameLoad Call NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareNotEq NameLoad Call NameLoad NameLoad BinOpAdd NameLoad Num body Raise Call NameLoad Str decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assert UnaryOpNot NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad AttributeLoad NameLoad attr ListLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Return NameLoad Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str keyword Num Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str keyword Num Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return NameLoad If Call AttributeLoad NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call NameLoad NameLoad BinOpAdd NameLoad Num If BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Call NameLoad NameLoad BinOpAdd NameLoad Num Raise Call NameLoad BinOpMod Str TupleLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore ListComp Call AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore ListLoad For NameStore NameLoad body AugAssignAdd NameStore SubscriptLoad AttributeLoad NameLoad attr Index SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Call NameLoad NameLoad orelse Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Assign NameStore Dict Assign NameStore Call NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad AugAssignAdd NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad For NameStore AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Call NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad AttributeLoad NameLoad attr NameLoad body Return AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad keyword NameLoad If CompareGt AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assign NameStore Call NameLoad NameLoad Str Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num If BoolOpAnd Call NameLoad NameLoad Str UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad orelse Assign NameStore ListComp BinOpMod Str TupleLoad NameLoad NameLoad comprehension NameStore NameLoad Return Call NameLoad NameLoad decorator_list NameLoad Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad ListLoad NameLoad Assign NameStore Call NameLoad ListLoad NameLoad Assign NameStore Dict NameLoad NameLoad Call NameLoad NameLoad Str Dict keyword Num Call NameLoad NameLoad Str Dict keyword Num Assign NameStore Call NameLoad ListLoad TupleLoad NameLoad ListLoad Call NameLoad ListLoad NameLoad Dict Num TupleLoad NameLoad ListLoad Call NameLoad ListLoad NameLoad Dict Num Assign NameStore Call NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Str Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Assert CompareEq AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Assert CompareEq AttributeLoad NameLoad attr Dict Str Str Str Str Num Num Num Num Assert CompareEq AttributeLoad NameLoad attr Dict Str Str Call NameLoad Num Num Call NameLoad Num Num Assert CompareEq AttributeLoad NameLoad attr Dict NameLoad NameLoad Call NameLoad Num Num Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Num Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr NameLoad Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr NameLoad Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Call NameLoad Num Num Call NameLoad Num Num Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Str Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad Assign NameStore Call NameLoad ListLoad Str Str Str Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Str Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Str Str Assert CompareIs AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr Dict Str Str Str Str Num Num Num Num Assert CompareEq AttributeLoad NameLoad attr Dict Str Str Str Str Call NameLoad Num Num Call NameLoad Num Num Call NameLoad Num Num Call NameLoad Num Num Assert CompareIs AttributeLoad NameLoad attr NameLoad Assert CompareEq Call AttributeLoad NameLoad attr Str Assert CompareEq Call AttributeLoad NameLoad attr Num Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Call NameLoad Num Num Assert CompareEq Call AttributeLoad Call NameLoad ListLoad Str Str Str attr Str Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str keyword NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str Call NameLoad NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str Str NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Delete SubscriptDel NameLoad Index NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad ListLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad ListLoad Call NameLoad ListLoad NameLoad Dict Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Str Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Str Dict keyword Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index Str SubscriptLoad NameLoad Index NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Num Str Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Num Call NameLoad ListLoad NameLoad Dict Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Dict NameLoad Call NameLoad NameLoad Str Dict keyword ListLoad Str Str Assign NameStore Call NameLoad ListLoad TupleLoad NameLoad ListLoad Call NameLoad ListLoad NameLoad Dict NameLoad Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num ListLoad Str Str Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str NameLoad NameLoad Assign NameStore Call NameLoad ListLoad NameLoad NameLoad Assign NameStore Dict NameLoad NameLoad Call NameLoad NameLoad Str Dict keyword ListLoad Str Str Call NameLoad NameLoad Str Dict keyword Num Assign NameStore Call NameLoad ListLoad TupleLoad NameLoad ListLoad Call NameLoad ListLoad NameLoad NameLoad Dict NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num ListLoad Str Str Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num ListLoad Str Str Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad ListLoad TupleLoad NameLoad ListLoad Call NameLoad ListLoad NameLoad NameLoad Dict Num Expr Call NameLoad TupleLoad NameLoad NameLoad NameLoad ListLoad Str Str Str Str NameLoad NameLoad Assign NameStore Call NameLoad ListLoad TupleLoad NameLoad ListLoad Call NameLoad ListLoad NameLoad NameLoad Dict NameLoad Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num ListLoad Str Str Str Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Str Str Str NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Num Num Num keyword Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num ListLoad Num Num keyword Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Assign NameStore Call NameLoad ListLoad Num Num Num NameLoad Assert CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr ListLoad Str ImportFrom alias Expr Call NameLoad NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr TupleLoad Num Num Num ImportFrom alias If NameLoad body Import alias Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num keyword ListLoad Str Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num keyword ListLoad Num Num Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num Assign AttributeStore NameLoad attr NameLoad Assert CompareIs Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr ListLoad Str Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str Str Str Assert Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr ListLoad ListLoad Num Num Num Num ListLoad Num Num Num Num Assert Call AttributeLoad NameLoad attr CompareEq AttributeLoad NameLoad attr ListLoad ListLoad Num ListLoad Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad ListLoad Str Str FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr keyword NameLoad NameStore body Expr Call AttributeLoad NameLoad attr Str Assert CompareIs Call NameLoad NameLoad NameLoad NameLoad Assert CompareEq Call NameLoad NameLoad Num Assert CompareIs AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad decorator_list Expr Call NameLoad Str Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Assert CompareEq AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr ListComp BinOpMod NameLoad TupleLoad NameLoad comprehension NameStore NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListComp BoolOpAnd Call AttributeLoad NameLoad attr NameLoad CompareIn Str NameLoad comprehension NameStore NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num Assign NameStore Str If Call AttributeLoad NameLoad attr NameLoad body While NameLoad body If Call AttributeLoad NameLoad attr ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore SubscriptLoad NameLoad Index NameLoad body For NameStore NameLoad body Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Slice Num orelse If CompareEq NameLoad Str body Assign NameStore Str orelse Break Return NameLoad decorator_list FunctionDef arguments args defaults body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad NameLoad Assert Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr Expr Call NameLoad Num ListLoad Num Num Num AttributeLoad NameLoad attr ListLoad Str Str Str NameLoad Expr Call NameLoad Num ListLoad Num Num Num AttributeLoad NameLoad attr ListLoad Str Str Str NameLoad Expr Call NameLoad Num ListLoad Num Num Num AttributeLoad NameLoad attr ListLoad Str Str Str NameLoad Expr Call NameLoad Num ListLoad Num Num Num AttributeLoad NameLoad attr ListLoad Str Str Str NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Str body Expr Str If BoolOpAnd Call NameLoad NameLoad NameLoad Call NameLoad NameLoad Str body Return NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad If Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad attr NameLoad If CompareGt AttributeLoad NameLoad attr Num body Raise Call NameLoad Str Assert CompareEq AttributeLoad NameLoad attr Num If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareNotEq Call NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num body Raise Call NameLoad BinOpMod Str TupleLoad Call NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str Return NameLoad decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot Call NameLoad NameLoad Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return Assert UnaryOpNot NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad BinOpMult NameLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num Call AttributeLoad NameLoad attr NameLoad If CompareLtE NameLoad NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ExtSlice Slice NameLoad Slice Assign NameStore ListComp Call NameLoad NameLoad SubscriptLoad NameLoad ExtSlice Slice Index NameLoad comprehension NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num FunctionDef arguments args NameParam defaults body Assert CompareEq AttributeLoad NameLoad attr Num If UnaryOpNot SubscriptLoad AttributeLoad NameLoad attr Index Num body Return Num orelse Return Call NameLoad ListComp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list Assign NameStore ListComp Call NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore ListComp Call NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad BinOpMult NameLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num Num Call AttributeLoad NameLoad attr NameLoad Assign NameStore CompareLt NameLoad NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMult Str NameLoad For NameStore BinOpAdd ListLoad NameLoad Call NameLoad Call NameLoad NameLoad body Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr If CompareLt NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad Expr Call AttributeLoad NameLoad attr BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body If CompareNotEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num body Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr orelse Assign NameStore BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad NameLoad attr Num Str If BoolOpOr UnaryOpNot NameLoad CompareGt SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd Str BinOpMult Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias Assign NameStore Call NameLoad ListLoad Str Str Str Str Assign NameStore Call NameLoad ListLoad ListLoad Num Num Num Num NameLoad Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Str Str Assign NameStore Call NameLoad ListLoad Str Expr Call NameLoad NameLoad NameLoad ListLoad ListLoad Num Num Num Num NameLoad Assign NameStore Call NameLoad ListLoad ListLoad Num Num Num Num Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Str Str Assign NameStore Call NameLoad ListLoad Num Num Num Num Assert CompareEq AttributeLoad NameLoad attr TupleLoad Num Num Expr Call NameLoad NameLoad NameLoad ListLoad ListLoad ListLoad Num Assign NameStore Call NameLoad NameLoad Assert CompareIs NameLoad NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assert CompareIsNot NameLoad NameLoad Assign NameStore Call NameLoad ListLoad ListLoad Num Num Num Num keyword Str Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Str Str Expr Call NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad ListLoad Num Num Num Expr Call NameLoad NameLoad NameLoad ListLoad Str Str Str Expr Call NameLoad NameLoad NameLoad ListLoad Num Num Call NameLoad Expr Call NameLoad NameLoad Expr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Num Expr Call NameLoad Call NameLoad BinOpMult Call AttributeLoad NameLoad attr Num Num Expr Call NameLoad SubscriptLoad NameLoad ExtSlice Slice Num Slice Expr Call NameLoad Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr Num attr TupleLoad Num Num Expr Call NameLoad Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call NameLoad Call NameLoad ListLoad AttributeLoad NameLoad attr Num Num Num Expr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num Expr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num Expr Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr TupleLoad Num Num decorator_list
N/A __future__ print_function N/A __all__ N/A DesignInfo FactorInfo SubtermInfo DesignMatrix N/A warnings N/A numbers N/A six N/A numpy np patsy PatsyError patsy.util atleast_2d_column_default patsy.compat OrderedDict patsy.util repr_pretty_delegate repr_pretty_impl safe_issubdtype no_pickling assert_no_pickling patsy.constraint linear_constraint patsy.contrasts ContrastMatrix patsy.desc ModelDesc Term FactorInfo N/A object N/A N/A A FactorInfo object is a simple class that provides some metadata about
    the role of a factor within a model. :attr:`DesignInfo.factor_infos` is
    a dictionary which maps factor objects to FactorInfo objects for each
    factor in the model.

    .. versionadded:: 0.4.0

    Attributes:

    .. attribute:: factor

       The factor object being described.

    .. attribute:: type

       The type of the factor -- either the string ``"numerical"`` or the
       string ``"categorical"``.

    .. attribute:: state

       An opaque object which holds the state needed to evaluate this
       factor on new data (e.g., for prediction). See
       :meth:`factor_protocol.eval`.

    .. attribute:: num_columns

       For numerical factors, the number of columns this factor produces. For
       categorical factors, this attribute will always be ``None``.

    .. attribute:: categories

       For categorical factors, a tuple of the possible categories this factor
       takes on, in order. For numerical factors, this attribute will always be
       ``None``.
     __init__ N/A N/A self factor type state num_columns categories N/A None None N/A N/A N/A self factor factor N/A N/A self type type N/A N/A N/A self type N/A numerical categorical N/A N/A N/A ValueError N/A FactorInfo.type must be 'numerical' or 'categorical', not %r N/A N/A self type N/A N/A self state state N/A N/A N/A self type numerical N/A N/A N/A N/A isinstance num_columns N/A six integer_types N/A N/A N/A ValueError For numerical factors, num_columns must be an integer N/A N/A categories None N/A N/A N/A ValueError For numerical factors, categories must be None N/A N/A N/A N/A self type categorical N/A N/A num_columns None N/A N/A N/A ValueError For categorical factors, num_columns must be None N/A categories N/A tuple categories N/A N/A self num_columns num_columns N/A N/A self categories categories N/A N/A __repr__ repr_pretty_delegate _repr_pretty_ N/A N/A self p cycle N/A N/A N/A N/A cycle FactorState N/A object N/A __repr__ N/A N/A self N/A N/A N/A <factor state> N/A N/A N/A kwlist N/A N/A factor N/A self factor N/A type N/A self type N/A state N/A FactorState N/A N/A N/A self type numerical N/A N/A N/A N/A kwlist append N/A num_columns N/A self num_columns N/A N/A N/A N/A kwlist append N/A categories N/A self categories N/A N/A repr_pretty_impl p self N/A kwlist N/A N/A __getstate__ no_pickling N/A test_FactorInfo N/A N/A N/A N/A N/A fi1 N/A FactorInfo asdf numerical N/A a 1 num_columns 10 N/A N/A N/A fi1 factor asdf N/A N/A N/A fi1 state N/A a 1 N/A N/A N/A fi1 type numerical N/A N/A N/A fi1 num_columns 10 N/A N/A N/A fi1 categories None N/A N/A repr fi1 N/A fi2 N/A FactorInfo asdf categorical N/A a 2 categories N/A z j N/A N/A N/A fi2 factor asdf N/A N/A N/A fi2 state N/A a 2 N/A N/A N/A fi2 type categorical N/A N/A N/A fi2 num_columns None N/A N/A N/A fi2 categories N/A z j N/A N/A repr fi2 nose.tools assert_raises N/A N/A assert_raises ValueError FactorInfo asdf non-numerical N/A N/A N/A assert_raises ValueError FactorInfo asdf numerical N/A N/A N/A assert_raises ValueError FactorInfo asdf numerical N/A num_columns asdf N/A N/A assert_raises ValueError FactorInfo asdf numerical N/A num_columns 1 categories 1 N/A N/A assert_raises TypeError FactorInfo asdf categorical N/A N/A N/A assert_raises ValueError FactorInfo asdf categorical N/A num_columns 1 N/A N/A assert_raises TypeError FactorInfo asdf categorical N/A categories 1 N/A N/A N/A six PY3 N/A N/A fi_long N/A FactorInfo asdf numerical N/A a 1 num_columns N/A long 10 N/A N/A N/A fi_long num_columns 10 N/A SubtermInfo N/A object N/A N/A A SubtermInfo object is a simple metadata container describing a single
    primitive interaction and how it is coded in our design matrix. Our final
    design matrix is produced by coding each primitive interaction in order
    from left to right, and then stacking the resulting columns. For each
    :class:`Term`, we have one or more of these objects which describe how
    that term is encoded. :attr:`DesignInfo.term_codings` is a dictionary
    which maps term objects to lists of SubtermInfo objects.

    To code a primitive interaction, the following steps are performed:

    * Evaluate each factor on the provided data.
    * Encode each factor into one or more proto-columns. For numerical
      factors, these proto-columns are identical to whatever the factor
      evaluates to; for categorical factors, they are encoded using a
      specified contrast matrix.
    * Form all pairwise, elementwise products between proto-columns generated
      by different factors. (For example, if factor 1 generated proto-columns
      A and B, and factor 2 generated proto-columns C and D, then our final
      columns are ``A * C``, ``B * C``, ``A * D``, ``B * D``.)
    * The resulting columns are stored directly into the final design matrix.

    Sometimes multiple primitive interactions are needed to encode a single
    term; this occurs, for example, in the formula ``"1 + a:b"`` when ``a``
    and ``b`` are categorical. See :ref:`formulas-building` for full details.

    .. versionadded:: 0.4.0

    Attributes:

    .. attribute:: factors

       The factors which appear in this subterm's interaction.

    .. attribute:: contrast_matrices

       A dict mapping factor objects to :class:`ContrastMatrix` objects,
       describing how each categorical factor in this interaction is coded.

    .. attribute:: num_columns

       The number of design matrix columns which this interaction generates.

     __init__ N/A N/A self factors contrast_matrices num_columns N/A N/A N/A N/A self factors N/A tuple factors N/A factor_set N/A frozenset factors N/A N/A N/A isinstance contrast_matrices dict N/A N/A N/A ValueError contrast_matrices must be dict N/A N/A factor contrast_matrix N/A N/A six iteritems contrast_matrices N/A N/A N/A factor factor_set N/A N/A N/A ValueError Unexpected factor in contrast_matrices dict N/A N/A N/A isinstance contrast_matrix ContrastMatrix N/A N/A N/A ValueError N/A Expected a ContrastMatrix, not %r N/A contrast_matrix N/A N/A self contrast_matrices contrast_matrices N/A N/A N/A isinstance num_columns N/A six integer_types N/A N/A N/A ValueError num_columns must be an integer N/A N/A self num_columns num_columns N/A N/A __repr__ repr_pretty_delegate _repr_pretty_ N/A N/A self p cycle N/A N/A N/A N/A cycle N/A N/A repr_pretty_impl p self N/A N/A N/A factors N/A self factors N/A contrast_matrices N/A self contrast_matrices N/A num_columns N/A self num_columns N/A N/A __getstate__ no_pickling N/A test_SubtermInfo N/A N/A N/A N/A N/A cm N/A ContrastMatrix N/A N/A np ones N/A 2 2 N/A [1] [2] N/A s N/A SubtermInfo N/A a x N/A a cm 4 N/A N/A N/A s factors N/A a x N/A N/A N/A s contrast_matrices N/A a cm N/A N/A N/A s num_columns 4 N/A N/A N/A six PY3 N/A N/A s N/A SubtermInfo N/A a x N/A a cm N/A long 4 N/A N/A N/A s num_columns 4 N/A N/A repr s nose.tools assert_raises N/A N/A assert_raises TypeError SubtermInfo 1 N/A 1 N/A N/A assert_raises ValueError SubtermInfo N/A a x 1 1 N/A N/A assert_raises ValueError SubtermInfo N/A a x N/A z cm 1 N/A N/A assert_raises ValueError SubtermInfo N/A a x N/A a 1 1 N/A N/A assert_raises ValueError SubtermInfo N/A a x N/A 1.5 N/A DesignInfo N/A object N/A N/A A DesignInfo object holds metadata about a design matrix.

    This is the main object that Patsy uses to pass metadata about a design
    matrix to statistical libraries, in order to allow further downstream
    processing like intelligent tests, prediction on new data, etc. Usually
    encountered as the `.design_info` attribute on design matrices.

     __init__ N/A N/A self column_names factor_infos term_codings N/A None None N/A N/A N/A self column_name_indexes N/A OrderedDict N/A zip column_names N/A range N/A len column_names N/A N/A N/A factor_infos None N/A term_codings None N/A N/A N/A ValueError Must specify either both or neither of factor_infos= and term_codings= N/A N/A self factor_infos factor_infos N/A N/A self term_codings term_codings N/A N/A N/A self factor_infos None N/A N/A N/A N/A isinstance N/A self factor_infos dict N/A N/A N/A ValueError factor_infos should be a dict N/A N/A N/A isinstance N/A self term_codings OrderedDict N/A N/A N/A ValueError term_codings must be an OrderedDict N/A N/A term subterms N/A N/A six iteritems N/A self term_codings N/A N/A N/A N/A isinstance term Term N/A N/A N/A ValueError N/A expected a Term, not %r N/A term N/A N/A N/A isinstance subterms list N/A N/A N/A ValueError term_codings must contain lists N/A term_factors N/A set N/A term factors N/A subterm subterms N/A N/A N/A N/A isinstance subterm SubtermInfo N/A N/A N/A ValueError N/A expected SubtermInfo, not %r N/A subterm N/A N/A N/A N/A term_factors issuperset N/A subterm factors N/A N/A N/A ValueError unexpected factors in subterm N/A all_factors N/A set N/A term N/A self term_codings N/A N/A N/A N/A all_factors update N/A term factors N/A N/A all_factors N/A set N/A self factor_infos N/A N/A N/A ValueError Provided Term objects and factor_infos do not match N/A N/A factor factor_info N/A N/A six iteritems N/A self factor_infos N/A N/A N/A N/A isinstance factor_info FactorInfo N/A N/A N/A ValueError N/A expected FactorInfo object, not %r N/A factor_info N/A N/A factor N/A factor_info factor N/A N/A N/A ValueError mismatched factor_info.factor N/A N/A term subterms N/A N/A six iteritems N/A self term_codings N/A N/A subterm subterms N/A N/A exp_cols 1 N/A cat_factors N/A set N/A factor N/A subterm factors N/A N/A fi N/A N/A self factor_infos N/A factor N/A N/A N/A fi type numerical N/A N/A exp_cols N/A fi num_columns N/A N/A N/A N/A fi type categorical N/A cm N/A N/A N/A subterm contrast_matrices N/A factor matrix N/A N/A N/A N/A cm shape N/A 0 N/A len N/A fi categories N/A N/A N/A ValueError N/A Mismatched contrast matrix for factor %r N/A factor N/A N/A N/A cat_factors add factor N/A exp_cols N/A N/A cm shape N/A 1 N/A N/A cat_factors N/A set N/A subterm contrast_matrices N/A N/A N/A ValueError Mismatch between contrast_matrices and categorical factors N/A N/A exp_cols N/A subterm num_columns N/A N/A N/A ValueError Unexpected num_columns N/A N/A term_codings None N/A N/A N/A self term_slices None N/A term_names column_names N/A slices N/A N/A slice i N/A i 1 N/A i N/A range N/A len column_names N/A N/A self term_name_slices N/A OrderedDict N/A zip term_names slices N/A N/A N/A self term_slices N/A OrderedDict N/A idx 0 N/A N/A term subterm_infos N/A N/A six iteritems N/A self term_codings N/A N/A term_columns 0 N/A subterm_info subterm_infos N/A N/A term_columns N/A subterm_info num_columns N/A N/A N/A self term_slices N/A term N/A slice idx N/A idx term_columns N/A idx term_columns N/A N/A idx N/A len N/A self column_names N/A N/A N/A ValueError mismatch between column_names and columns coded by given terms N/A N/A self term_name_slices N/A OrderedDict N/A N/A N/A N/A term name slice_ N/A N/A term slice_ N/A N/A six iteritems N/A self term_slices N/A N/A N/A self term_name_slices None N/A N/A N/A self term_slices None N/A N/A N/A N/A list N/A N/A N/A self term_slices values N/A list N/A N/A N/A self term_name_slices values N/A covered 0 N/A slice_ N/A N/A six itervalues N/A self term_name_slices N/A N/A N/A start stop step N/A N/A slice_ indices N/A len column_names N/A N/A start covered N/A N/A step 1 N/A covered stop N/A N/A covered N/A len column_names N/A N/A column_name index N/A N/A six iteritems N/A self column_name_indexes N/A N/A N/A column_name N/A self term_name_slices N/A N/A slice_ N/A N/A self term_name_slices N/A column_name N/A N/A slice_ N/A slice index N/A index 1 N/A N/A N/A ValueError term/column name collision N/A N/A __repr__ repr_pretty_delegate _repr_pretty_ N/A N/A self p cycle N/A N/A N/A N/A cycle N/A N/A repr_pretty_impl p self N/A N/A self column_names N/A N/A factor_infos N/A self factor_infos N/A term_codings N/A self term_codings N/A column_names N/A N/A self N/A N/A N/A A list of the column names, in order. N/A N/A list N/A self column_name_indexes N/A property terms N/A N/A self N/A N/A N/A A list of :class:`Terms`, in order, or else None. N/A N/A N/A self term_slices None N/A N/A None N/A N/A list N/A self term_slices N/A property term_names N/A N/A self N/A N/A N/A A list of terms, in order. N/A N/A list N/A self term_name_slices N/A property builder N/A N/A self N/A N/A N/A .. deprecated:: 0.4.0 N/A N/A N/A warnings warn N/A DeprecationWarning The DesignInfo.builder attribute is deprecated starting in patsy v0.4.0; distinct builder objects have been eliminated and design_info.builder is now just a long-winded way of writing 'design_info' (i.e. the .builder attribute just returns self) stacklevel 2 N/A self N/A property design_info N/A N/A self N/A N/A N/A .. deprecated:: 0.4.0 N/A N/A N/A warnings warn N/A DeprecationWarning Starting in patsy v0.4.0, the DesignMatrixBuilder class has been merged into the DesignInfo class. So there's no need to use builder.design_info to access the DesignInfo; 'builder' already *is* a DesignInfo. stacklevel 2 N/A self N/A property slice N/A N/A self columns_specifier N/A N/A N/A Locate a subset of design matrix columns, specified symbolically.

        A patsy design matrix has two levels of structure: the individual
        columns (which are named), and the :ref:`terms <formulas>` in
        the formula that generated those columns. This is a one-to-many
        relationship: a single term may span several columns. This method
        provides a user-friendly API for locating those columns.

        (While we talk about columns here, this is probably most useful for
        indexing into other arrays that are derived from the design matrix,
        such as regression coefficients or covariance matrices.)

        The `columns_specifier` argument can take a number of forms:

        * A term name
        * A column name
        * A :class:`Term` object
        * An integer giving a raw index
        * A raw slice object

        In all cases, a Python :func:`slice` object is returned, which can be
        used directly for indexing.

        Example::

          y, X = dmatrices("y ~ a", demo_data("y", "a", nlevels=3))
          betas = np.linalg.lstsq(X, y)[0]
          a_betas = betas[X.design_info.slice("a")]

        (If you want to look up a single individual column by name, use
        ``design_info.column_name_indexes[name]``.)
         N/A N/A isinstance columns_specifier slice N/A N/A columns_specifier N/A N/A N/A np issubsctype N/A type columns_specifier N/A np integer N/A N/A N/A slice columns_specifier N/A columns_specifier 1 N/A N/A N/A N/A self term_slices None N/A columns_specifier N/A self term_slices N/A N/A N/A N/A self term_slices N/A columns_specifier N/A N/A columns_specifier N/A self term_name_slices N/A N/A N/A N/A self term_name_slices N/A columns_specifier N/A N/A columns_specifier N/A self column_name_indexes N/A N/A idx N/A N/A self column_name_indexes N/A columns_specifier N/A N/A slice idx N/A idx 1 N/A N/A PatsyError N/A unknown column specified '%s' N/A columns_specifier N/A linear_constraint N/A N/A self constraint_likes N/A N/A N/A Construct a linear constraint in matrix form from a (possibly
        symbolic) description.

        Possible inputs:

        * A dictionary which is taken as a set of equality constraint. Keys
          can be either string column names, or integer column indexes.
        * A string giving a arithmetic expression referring to the matrix
          columns by name.
        * A list of such strings which are ANDed together.
        * A tuple (A, b) where A and b are array_likes, and the constraint is
          Ax = b. If necessary, these will be coerced to the proper
          dimensionality by appending dimensions with size 1.

        The string-based language has the standard arithmetic operators, / * +
        - and parentheses, plus "=" is used for equality and "," is used to
        AND together multiple constraint equations within a string. You can
        If no = appears in some expression, then that expression is assumed to
        be equal to zero. Division is always float-based, even if
        ``__future__.true_division`` isn't in effect.

        Returns a :class:`LinearConstraint` object.

        Examples::

          di = DesignInfo(["x1", "x2", "x3"])

          # Equivalent ways to write x1 == 0:
          di.linear_constraint({"x1": 0})  # by name
          di.linear_constraint({0: 0})  # by index
          di.linear_constraint("x1 = 0")  # string based
          di.linear_constraint("x1")  # can leave out "= 0"
          di.linear_constraint("2 * x1 = (x1 + 2 * x1) / 3")
          di.linear_constraint(([1, 0, 0], 0))  # constraint matrices

          # Equivalent ways to write x1 == 0 and x3 == 10
          di.linear_constraint({"x1": 0, "x3": 10})
          di.linear_constraint({0: 0, 2: 10})
          di.linear_constraint({0: 0, "x3": 10})
          di.linear_constraint("x1 = 0, x3 = 10")
          di.linear_constraint("x1, x3 = 10")
          di.linear_constraint(["x1", "x3 = 0"])  # list of strings
          di.linear_constraint("x1 = 0, x3 - 10 = x1")
          di.linear_constraint([[1, 0, 0], [0, 0, 1]], [0, 10])

          # You can also chain together equalities, just like Python:
          di.linear_constraint("x1 = x2 = 3")
         N/A N/A linear_constraint constraint_likes N/A self column_names N/A describe N/A N/A self N/A N/A N/A Returns a human-readable string describing this design info.

        Example:

        .. ipython::

          In [1]: y, X = dmatrices("y ~ x1 + x2", demo_data("y", "x1", "x2"))

          In [2]: y.design_info.describe()
          Out[2]: 'y'

          In [3]: X.design_info.describe()
          Out[3]: '1 + x1 + x2'

        .. warning::

           There is no guarantee that the strings returned by this function
           can be parsed as formulas, or that if they can be parsed as a
           formula that they will produce a model equivalent to the one you
           started with. This function produces a best-effort description
           intended for humans to read.

         N/A names N/A N/A name N/A self term_names N/A N/A N/A name Intercept N/A N/A N/A N/A names append 1 N/A N/A N/A N/A names append name N/A N/A N/A  +  join names N/A subset N/A N/A self which_terms N/A N/A N/A Create a new :class:`DesignInfo` for design matrices that contain a
        subset of the terms that the current :class:`DesignInfo` does.

        For example, if ``design_info`` has terms ``x``, ``y``, and ``z``,
        then::

          design_info2 = design_info.subset(["x", "z"])

        will return a new DesignInfo that can be used to construct design
        matrices with only the columns corresponding to the terms ``x`` and
        ``z``. After we do this, then in general these two expressions will
        return the same thing (here we assume that ``x``, ``y``, and ``z``
        each generate a single column of the output)::

          build_design_matrix([design_info], data)[0][:, [0, 2]]
          build_design_matrix([design_info2], data)[0]

        However, a critical difference is that in the second case, ``data``
        need not contain any values for ``y``. This is very useful when doing
        prediction using a subset of a model, in which situation R usually
        forces you to specify dummy values for ``y``.

        If using a formula to specify the terms to include, remember that like
        any formula, the intercept term will be included by default, so use
        ``0`` or ``-1`` in your formula if you want to avoid this.

        This method can also be used to reorder the terms in your design
        matrix, in case you want to do that for some reason. I can't think of
        any.

        Note that this method will generally *not* produce the same result as
        creating a new model directly. Consider these DesignInfo objects::

            design1 = dmatrix("1 + C(a)", data)
            design2 = design1.subset("0 + C(a)")
            design3 = dmatrix("0 + C(a)", data)

        Here ``design2`` and ``design3`` will both produce design matrices
        that contain an encoding of ``C(a)`` without any intercept term. But
        ``design3`` uses a full-rank encoding for the categorical term
        ``C(a)``, while ``design2`` uses the same reduced-rank encoding as
        ``design1``.

        :arg which_terms: The terms which should be kept in the new
          :class:`DesignMatrixBuilder`. If this is a string, then it is parsed
          as a formula, and then the names of the resulting terms are taken as
          the terms to keep. If it is a list, then it can contain a mixture of
          term names (as strings) and :class:`Term` objects.

        .. versionadded: 0.2.0
           New method on the class DesignMatrixBuilder.

        .. versionchanged: 0.4.0
           Moved from DesignMatrixBuilder to DesignInfo, as part of the
           removal of DesignMatrixBuilder.

         N/A N/A isinstance which_terms str N/A N/A desc N/A N/A ModelDesc from_formula which_terms N/A N/A desc lhs_termlist N/A N/A N/A PatsyError right-hand-side-only formula required N/A which_terms N/A N/A N/A term name N/A term N/A desc rhs_termlist N/A N/A N/A self term_codings None N/A N/A new_names N/A N/A t which_terms N/A N/A new_names N/A N/A self column_names N/A N/A N/A self term_name_slices N/A t N/A N/A DesignInfo new_names N/A N/A term_name_to_term N/A N/A term N/A self term_codings N/A N/A N/A term_name_to_term N/A N/A N/A term name term N/A new_column_names N/A N/A new_factor_infos N/A N/A new_term_codings N/A OrderedDict N/A name_or_term which_terms N/A N/A term N/A N/A term_name_to_term get name_or_term name_or_term N/A s N/A N/A self term_slices N/A term N/A new_column_names N/A N/A self column_names N/A s N/A f N/A term factors N/A N/A N/A new_factor_infos N/A f N/A N/A self factor_infos N/A f N/A N/A new_term_codings N/A term N/A N/A self term_codings N/A term N/A N/A DesignInfo new_column_names factor_infos new_factor_infos term_codings new_term_codings N/A from_array N/A N/A cls array_like default_column_prefix N/A column N/A N/A Find or construct a DesignInfo appropriate for a given array_like.

        If the input `array_like` already has a ``.design_info``
        attribute, then it will be returned. Otherwise, a new DesignInfo
        object will be constructed, using names either taken from the
        `array_like` (e.g., for a pandas DataFrame with named columns), or
        constructed using `default_column_prefix`.

        This is how :func:`dmatrix` (for example) creates a DesignInfo object
        if an arbitrary matrix is passed in.

        :arg array_like: An ndarray or pandas container.
        :arg default_column_prefix: If it's necessary to invent column names,
          then this will be used to construct them.
        :returns: a DesignInfo object
         N/A N/A N/A hasattr array_like design_info N/A isinstance N/A array_like design_info cls N/A N/A N/A array_like design_info N/A arr N/A atleast_2d_column_default array_like preserve_pandas True N/A N/A N/A arr ndim 2 N/A N/A N/A ValueError design matrix can't have >2 dimensions N/A columns N/A getattr arr columns N/A range N/A N/A arr shape N/A 1 N/A N/A N/A hasattr columns dtype N/A N/A safe_issubdtype N/A columns dtype N/A np integer N/A N/A column_names N/A N/A str obj N/A obj columns N/A N/A column_names N/A N/A %s%s N/A default_column_prefix i N/A i columns N/A N/A DesignInfo column_names N/A classmethod N/A __getstate__ no_pickling N/A test_DesignInfo N/A N/A N/A N/A nose.tools assert_raises _MockFactor N/A object N/A __init__ N/A N/A self name N/A N/A N/A N/A self _name name N/A name N/A N/A self N/A N/A N/A N/A self _name N/A N/A N/A f_x N/A _MockFactor x N/A f_y N/A _MockFactor y N/A t_x N/A Term N/A f_x N/A t_y N/A Term N/A f_y N/A factor_infos N/A f_x f_y N/A FactorInfo f_x numerical N/A num_columns 3 N/A FactorInfo f_y numerical N/A num_columns 1 N/A term_codings N/A OrderedDict N/A N/A t_x N/A N/A SubtermInfo N/A f_x N/A 3 N/A t_y N/A N/A SubtermInfo N/A f_y N/A 1 N/A di N/A DesignInfo N/A x1 x2 x3 y factor_infos term_codings N/A N/A N/A di column_names N/A x1 x2 x3 y N/A N/A N/A di term_names N/A x y N/A N/A N/A di terms N/A t_x t_y N/A N/A N/A di column_name_indexes N/A x1 x2 x3 y 0 1 2 3 N/A N/A N/A di term_name_slices N/A x y N/A slice 0 3 N/A slice 3 4 N/A N/A N/A di term_slices N/A t_x t_y N/A slice 0 3 N/A slice 3 4 N/A N/A N/A N/A di describe x + y N/A N/A N/A N/A di slice 1 N/A slice 1 2 N/A N/A N/A N/A di slice x1 N/A slice 0 1 N/A N/A N/A N/A di slice x2 N/A slice 1 2 N/A N/A N/A N/A di slice x3 N/A slice 2 3 N/A N/A N/A N/A di slice x N/A slice 0 3 N/A N/A N/A N/A di slice t_x N/A slice 0 3 N/A N/A N/A N/A di slice y N/A slice 3 4 N/A N/A N/A N/A di slice t_y N/A slice 3 4 N/A N/A N/A N/A di slice N/A slice 2 4 N/A slice 2 4 N/A N/A assert_raises PatsyError N/A di slice asdf N/A N/A repr di N/A N/A assert_no_pickling di N/A di N/A DesignInfo N/A a1 a2 a3 b N/A N/A N/A di column_names N/A a1 a2 a3 b N/A N/A N/A di term_names N/A a1 a2 a3 b N/A N/A N/A di terms None N/A N/A N/A di column_name_indexes N/A a1 a2 a3 b 0 1 2 3 N/A N/A N/A di term_name_slices N/A a1 a2 a3 b N/A slice 0 1 N/A slice 1 2 N/A slice 2 3 N/A slice 3 4 N/A N/A N/A di term_slices None N/A N/A N/A N/A di describe a1 + a2 + a3 + b N/A N/A N/A N/A di slice 1 N/A slice 1 2 N/A N/A N/A N/A di slice a1 N/A slice 0 1 N/A N/A N/A N/A di slice a2 N/A slice 1 2 N/A N/A N/A N/A di slice a3 N/A slice 2 3 N/A N/A N/A N/A di slice b N/A slice 3 4 N/A N/A N/A N/A N/A DesignInfo N/A Intercept a b describe 1 + a + b N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y factor_infos factor_infos N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y term_codings term_codings N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y N/A list factor_infos term_codings N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y1 y2 factor_infos term_codings N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 factor_infos term_codings N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 y y2 factor_infos term_codings N/A N/A assert_raises ValueError DesignInfo N/A x1 x1 x1 y factor_infos term_codings N/A term_codings_x_only N/A OrderedDict term_codings N/A N/A term_codings_x_only N/A t_y N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 factor_infos term_codings_x_only N/A f_a N/A _MockFactor a N/A t_a N/A Term N/A f_a N/A term_codings_with_a N/A OrderedDict term_codings N/A N/A term_codings_with_a N/A t_a N/A N/A SubtermInfo N/A f_a N/A 1 N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y a factor_infos term_codings_with_a N/A not_factor_infos N/A dict factor_infos N/A N/A not_factor_infos N/A f_x what is this I don't even N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y not_factor_infos term_codings N/A mismatch_factor_infos N/A dict factor_infos N/A N/A mismatch_factor_infos N/A f_x N/A FactorInfo f_a numerical N/A num_columns 3 N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y mismatch_factor_infos term_codings N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y factor_infos N/A dict term_codings N/A not_term_codings N/A OrderedDict term_codings N/A N/A not_term_codings N/A this is a string N/A term_codings N/A t_x N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y factor_infos not_term_codings N/A non_list_term_codings N/A OrderedDict term_codings N/A N/A non_list_term_codings N/A t_y N/A tuple N/A term_codings N/A t_y N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y factor_infos non_list_term_codings N/A non_subterm_term_codings N/A OrderedDict term_codings N/A N/A N/A non_subterm_term_codings N/A t_y N/A 0 not a SubtermInfo N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y factor_infos non_subterm_term_codings N/A bad_subterm N/A OrderedDict term_codings N/A N/A N/A term_codings N/A t_y N/A 0 N/A SubtermInfo N/A f_x N/A 1 N/A N/A assert_raises ValueError DesignInfo N/A x1 x2 x3 y factor_infos bad_subterm N/A factor_codings_a N/A f_a N/A FactorInfo f_a categorical N/A categories N/A a1 a2 N/A term_codings_a_bad_rows N/A OrderedDict N/A N/A t_a N/A N/A SubtermInfo N/A f_a N/A f_a N/A ContrastMatrix N/A N/A np ones N/A 3 2 N/A [1] [2] 2 N/A N/A assert_raises ValueError DesignInfo N/A a[1] a[2] factor_codings_a term_codings_a_bad_rows N/A t_ax N/A Term N/A f_a f_x N/A factor_codings_ax N/A f_a f_x N/A FactorInfo f_a categorical N/A categories N/A a1 a2 N/A FactorInfo f_x numerical N/A num_columns 2 N/A term_codings_ax_extra_cm N/A OrderedDict N/A N/A t_ax N/A N/A SubtermInfo N/A f_a f_x N/A f_a f_x N/A ContrastMatrix N/A N/A np ones N/A 2 2 N/A [1] [2] N/A ContrastMatrix N/A N/A np ones N/A 2 2 N/A [1] [2] 4 N/A N/A assert_raises ValueError DesignInfo N/A a[1]:x[1] a[2]:x[1] a[1]:x[2] a[2]:x[2] factor_codings_ax term_codings_ax_extra_cm N/A term_codings_ax_missing_cm N/A OrderedDict N/A N/A t_ax N/A N/A SubtermInfo N/A f_a f_x N/A 4 N/A N/A assert_raises N/A ValueError KeyError DesignInfo N/A a[1]:x[1] a[2]:x[1] a[1]:x[2] a[2]:x[2] factor_codings_ax term_codings_ax_missing_cm N/A term_codings_ax_wrong_subterm_columns N/A OrderedDict N/A N/A t_ax N/A N/A SubtermInfo N/A f_a f_x N/A f_a N/A ContrastMatrix N/A N/A np ones N/A 2 3 N/A [1] [2] [3] 5 N/A N/A assert_raises ValueError DesignInfo N/A a[1]:x[1] a[2]:x[1] a[3]:x[1] a[1]:x[2] a[2]:x[2] a[3]:x[2] factor_codings_ax term_codings_ax_wrong_subterm_columns N/A test_DesignInfo_from_array N/A N/A N/A N/A N/A di N/A N/A DesignInfo from_array N/A 1 2 3 N/A N/A N/A di column_names N/A column0 N/A di2 N/A N/A DesignInfo from_array N/A N/A 1 2 N/A 2 3 N/A 3 4 N/A N/A N/A di2 column_names N/A column0 column1 N/A di3 N/A N/A DesignInfo from_array N/A 1 2 3 default_column_prefix x N/A N/A N/A di3 column_names N/A x0 N/A di4 N/A N/A DesignInfo from_array N/A N/A 1 2 N/A 2 3 N/A 3 4 default_column_prefix x N/A N/A N/A di4 column_names N/A x0 x1 N/A m N/A DesignMatrix N/A 1 2 3 di3 N/A N/A N/A N/A DesignInfo from_array m di3 N/A N/A m design_info asdf N/A di_weird N/A N/A DesignInfo from_array m N/A N/A N/A di_weird column_names N/A column0 nose.tools assert_raises N/A N/A assert_raises ValueError N/A DesignInfo from_array N/A N/A np ones N/A 2 2 2 patsy.util have_pandas N/A have_pandas N/A N/A pandas N/A di5 N/A N/A DesignInfo from_array N/A N/A pandas DataFrame N/A N/A 1 2 columns N/A a b N/A N/A N/A di5 column_names N/A a b N/A di6 N/A N/A DesignInfo from_array N/A N/A pandas DataFrame N/A N/A 1 2 columns N/A 0 10 N/A N/A N/A di6 column_names N/A column0 column10 N/A df N/A N/A pandas DataFrame N/A N/A 1 2 N/A N/A df design_info di6 N/A N/A N/A N/A DesignInfo from_array df di6 N/A test_DesignInfo_linear_constraint N/A N/A N/A N/A N/A di N/A DesignInfo N/A a1 a2 a3 b N/A con N/A N/A di linear_constraint N/A 2 * a1 = b + 1 a3 N/A N/A N/A con variable_names N/A a1 a2 a3 b N/A N/A N/A np all N/A N/A con coefs N/A N/A 2 0 0 -1 N/A 0 0 1 0 N/A N/A N/A np all N/A N/A con constants N/A N/A 1 N/A 0 N/A test_DesignInfo_deprecated_attributes N/A N/A N/A N/A N/A d N/A DesignInfo N/A a1 a2 check N/A N/A attr N/A N/A N/A N/A N/A warnings catch_warnings record True w N/A N/A N/A N/A warnings simplefilter always N/A N/A N/A getattr d attr d N/A N/A N/A len w 1 N/A N/A N/A N/A w N/A 0 category DeprecationWarning N/A N/A N/A check builder N/A N/A check design_info N/A _format_float_column N/A N/A precision col N/A N/A N/A format_str N/A N/A %. N/A str precision f N/A N/A N/A col ndim 1 N/A simple_float_chars N/A set +-0123456789. N/A col_strs N/A N/A np array N/A N/A format_str N/A x N/A x col dtype object N/A mask N/A N/A np array N/A N/A N/A N/A simple_float_chars issuperset col_str N/A . col_str N/A col_str col_strs N/A mask_idxes N/A N/A N/A np nonzero mask N/A 0 N/A strip_char 0 N/A N/A N/A np any mask N/A N/A True N/A N/A N/A N/A np all N/A N/A N/A s endswith strip_char N/A s N/A col_strs N/A mask N/A N/A idx mask_idxes N/A N/A N/A col_strs N/A idx N/A N/A col_strs N/A idx N/A -1 N/A N/A N/A strip_char 0 N/A N/A strip_char . N/A N/A N/A col_strs N/A test__format_float_column N/A N/A N/A N/A t N/A N/A precision numbers expected N/A N/A N/A got N/A _format_float_column precision N/A N/A np asarray numbers N/A N/A print got expected N/A N/A N/A np array_equal got expected N/A N/A nan_string N/A %.3f N/A N/A np nan N/A N/A t 3 N/A 1 2.1234 2.1239 N/A np nan N/A 1.000 2.123 2.124 nan_string N/A N/A t 3 N/A 1 2 3 N/A np nan N/A 1 2 3 nan_string N/A N/A t 3 N/A 1.0001 2 3 N/A np nan N/A 1 2 3 nan_string N/A N/A t 4 N/A 1.0001 2 3 N/A np nan N/A 1.0001 2.0000 3.0000 nan_string N/A DesignMatrix N/A N/A np ndarray N/A N/A A simple numpy array subclass that carries design matrix metadata.

    .. attribute:: design_info

       A :class:`DesignInfo` object containing metadata about this design
       matrix.

    This class also defines a fancy __repr__ method with labeled
    columns. Otherwise it is identical to a regular numpy ndarray.

    .. warning::

       You should never check for this class using
       :func:`isinstance`. Limitations of the numpy API mean that it is
       impossible to prevent the creation of numpy arrays that have type
       DesignMatrix, but that are not actually design matrices (and such
       objects will behave like regular ndarrays in every way). Instead, check
       for the presence of a ``.design_info`` attribute -- this will be
       present only on "real" DesignMatrix objects.
     __new__ N/A N/A cls input_array design_info default_column_prefix N/A None column N/A N/A Create a DesignMatrix, or cast an existing matrix to a DesignMatrix.

        A call like::

          DesignMatrix(my_array)

        will convert an arbitrary array_like object into a DesignMatrix.

        The return from this function is guaranteed to be a two-dimensional
        ndarray with a real-valued floating point dtype, and a
        ``.design_info`` attribute which matches its shape. If the
        `design_info` argument is not given, then one is created via
        :meth:`DesignInfo.from_array` using the given
        `default_column_prefix`.

        Depending on the input array, it is possible this will pass through
        its input unchanged, or create a view.
         N/A N/A N/A isinstance input_array DesignMatrix N/A hasattr input_array design_info N/A N/A input_array N/A self N/A N/A N/A atleast_2d_column_default input_array view cls N/A N/A safe_issubdtype N/A self dtype N/A np integer N/A N/A self N/A N/A N/A N/A np asarray self dtype float view cls N/A N/A N/A self ndim 2 N/A N/A N/A ValueError DesignMatrix must be 2d N/A N/A N/A self ndim 2 N/A N/A design_info None N/A N/A design_info N/A N/A DesignInfo from_array self default_column_prefix N/A N/A N/A len N/A design_info column_names N/A N/A self shape N/A 1 N/A N/A N/A ValueError N/A wrong number of column names for design matrix (got %s, wanted %s) N/A N/A len N/A design_info column_names N/A N/A self shape N/A 1 N/A N/A self design_info design_info N/A N/A N/A safe_issubdtype N/A self dtype N/A np floating N/A N/A N/A ValueError design matrix must be real-valued floating point N/A self N/A N/A __repr__ repr_pretty_delegate _repr_pretty_ N/A N/A self p cycle N/A N/A N/A N/A N/A hasattr self design_info N/A N/A N/A N/A p pretty N/A N/A np asarray self N/A N/A N/A cycle N/A MAX_TOTAL_WIDTH 78 N/A SEP 2 N/A INDENT 2 N/A MAX_ROWS 30 N/A PRECISION 5 N/A names N/A N/A self design_info column_names N/A column_name_widths N/A N/A len name N/A name names N/A min_total_width N/A N/A INDENT N/A SEP N/A N/A N/A self shape N/A 1 1 N/A N/A np sum column_name_widths N/A N/A min_total_width MAX_TOTAL_WIDTH N/A N/A printable_part N/A N/A N/A np asarray self N/A N/A MAX_ROWS N/A N/A formatted_cols N/A N/A _format_float_column PRECISION N/A printable_part N/A N/A N/A i N/A i N/A range N/A N/A self shape N/A 1 max_width N/A N/A col N/A N/A N/A N/A N/A col ndim 1 N/A N/A N/A N/A col shape N/A 0 N/A N/A 0 N/A N/A N/A max N/A N/A len s N/A s col N/A N/A column_num_widths N/A N/A max_width col N/A col formatted_cols N/A column_widths N/A N/A max name_width num_width N/A N/A name_width num_width N/A zip column_name_widths column_num_widths N/A total_width N/A N/A INDENT N/A SEP N/A N/A N/A self shape N/A 1 1 N/A N/A np sum column_widths N/A print_numbers N/A total_width MAX_TOTAL_WIDTH N/A N/A print_numbers False N/A N/A N/A p begin_group INDENT N/A DesignMatrix with shape %s N/A N/A self shape N/A N/A N/A p breakable N/A N/A N/A p indentation N/A print_numbers N/A N/A sep N/A SEP N/A row N/A N/A names N/A list N/A zip formatted_cols N/A N/A cells N/A N/A N/A cell rjust width N/A N/A width cell N/A zip column_widths row N/A N/A N/A p text N/A N/A sep join cells N/A N/A N/A p text N/A N/A N/A p indentation N/A N/A MAX_ROWS N/A N/A self shape N/A 0 N/A N/A N/A N/A p text N/A [%s rows omitted] N/A N/A N/A N/A self shape N/A 0 MAX_ROWS N/A N/A N/A p text N/A N/A N/A p indentation N/A N/A N/A N/A p begin_group 2 Columns: N/A N/A N/A p breakable N/A N/A N/A p indentation N/A N/A N/A p pretty names N/A N/A N/A p end_group 2 N/A N/A N/A p breakable N/A N/A N/A p indentation N/A N/A N/A p begin_group 2 Terms: N/A N/A N/A p breakable N/A N/A N/A p indentation N/A N/A term_name span N/A N/A six iteritems N/A N/A self design_info term_name_slices N/A N/A N/A N/A span start 0 N/A N/A N/A N/A p breakable ,  N/A N/A N/A p pretty term_name N/A N/A N/A N/A span stop N/A span start 1 N/A N/A coltext N/A column %s N/A N/A span start N/A N/A coltext N/A columns %s:%s N/A N/A span start N/A span stop N/A N/A N/A p text N/A  (%s) N/A coltext N/A N/A N/A p end_group 2 N/A N/A N/A print_numbers N/A N/A N/A self shape N/A 0 MAX_ROWS N/A N/A N/A N/A p breakable N/A N/A N/A p indentation N/A N/A N/A p text (to view full data, use np.asarray(this_obj)) N/A N/A N/A p end_group INDENT N/A N/A __reduce__ no_pickling N/A test_design_matrix N/A N/A N/A N/A nose.tools assert_raises N/A di N/A DesignInfo N/A a1 a2 a3 b N/A mm N/A DesignMatrix N/A N/A 12 14 16 18 di N/A N/A N/A N/A mm design_info column_names N/A a1 a2 a3 b N/A bad_di N/A DesignInfo N/A a1 N/A N/A assert_raises ValueError DesignMatrix N/A N/A 12 14 16 18 bad_di N/A mm2 N/A DesignMatrix N/A N/A 12 14 16 18 N/A N/A N/A N/A mm2 design_info column_names N/A column0 column1 column2 column3 N/A mm3 N/A DesignMatrix N/A 12 14 16 18 N/A N/A N/A mm3 shape N/A 4 1 N/A N/A assert_raises ValueError DesignMatrix N/A N/A N/A 1 N/A mm4 N/A DesignMatrix mm N/A N/A mm4 mm N/A mm5 N/A DesignMatrix N/A N/A mm diagonal N/A N/A mm5 mm N/A mm6 N/A DesignMatrix N/A N/A 12 14 16 18 default_column_prefix x N/A N/A N/A N/A mm6 design_info column_names N/A x0 x1 x2 x3 N/A N/A assert_no_pickling mm6 N/A N/A assert_raises ValueError DesignMatrix N/A 1 2 3j N/A N/A assert_raises ValueError DesignMatrix N/A a b c N/A N/A assert_raises ValueError DesignMatrix N/A 1 2 N/A object N/A N/A repr mm N/A N/A repr N/A DesignMatrix N/A N/A np arange 100 N/A N/A repr N/A DesignMatrix N/A N/A N/A np arange 100 2.0 N/A N/A repr N/A mm N/A N/A 1 N/A N/A N/A repr N/A DesignMatrix N/A N/A N/A N/A np arange 100 reshape N/A 1 100 N/A N/A repr N/A DesignMatrix N/A N/A np nan N/A np inf N/A N/A repr N/A DesignMatrix N/A N/A np nan 0 1e+20 20.5 N/A N/A repr N/A DesignMatrix N/A N/A np zeros N/A 1 0 N/A N/A repr N/A DesignMatrix N/A N/A np zeros N/A 0 1 N/A N/A repr N/A DesignMatrix N/A N/A np zeros N/A 0 0 N/A