Module Expr Str ImportFrom alias alias alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body Pass ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias alias alias ImportFrom alias alias alias ImportFrom alias Import alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr Str TryExcept body Import alias Assign NameStore NameLoad TryExcept body Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr handlers ExceptHandler type NameLoad body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Dict Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Assign NameStore NameLoad If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad FunctionDef arguments args defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body If UnaryOpNot NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign NameStore BinOpMult Call NameLoad Str Call AttributeLoad NameLoad attr TupleLoad Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Num Num Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Expr Call NameLoad Num AttributeLoad NameLoad attr NameLoad Num NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Return AttributeLoad NameLoad attr decorator_list Assign AttributeStore NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr Dict Num ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr orelse Return BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str AttributeLoad NameLoad attr Return Call NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad ListLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad If BoolOpAnd NameLoad CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num Num CompareIn AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr If BoolOpOr CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd CompareEq NameLoad Num Call NameLoad body Expr Call AttributeLoad NameLoad attr Num Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Num Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareNotEq NameLoad Num body AugAssignMult NameStore NameLoad If CompareNotEq NameLoad Num body If CompareNotEq NameLoad Num body AugAssignAdd NameStore BinOpMult NameLoad NameLoad orelse AugAssignAdd NameStore NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Num Index Num Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return ListLoad SubscriptLoad NameLoad Index Num decorator_list decorator_list Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr Dict Num ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr orelse Return BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq Call NameLoad Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num body Raise Call NameLoad Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad Str AttributeLoad NameLoad attr If CompareNotIn AttributeLoad NameLoad attr TupleLoad Str Str Str Str body Raise Call NameLoad Str AttributeLoad NameLoad attr Return Call NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad ListLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad If AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr If CompareNotEq NameLoad Num body AugAssignAdd NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return ListLoad SubscriptLoad NameLoad Index Num decorator_list decorator_list Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Return Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad If NameLoad body Assign NameStore NameLoad Assign NameStore ListComp SubscriptLoad NameLoad Slice Num comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad For NameStore NameLoad body For NameStore Call AttributeLoad NameLoad attr NameLoad body If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body If Call NameLoad ListComp CompareGtE Call AttributeLoad NameLoad attr NameLoad Num comprehension NameStore NameLoad body Assign NameStore NameLoad If BoolOpAnd UnaryOpNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str For NameStore Call AttributeLoad NameLoad attr body If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num TryExcept body Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Slice Num Num Assert CompareEq NameLoad Str handlers ExceptHandler type NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad If BoolOpAnd NameLoad CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num orelse If BoolOpAnd NameLoad CompareEq NameLoad Str body Raise Call NameLoad Str NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num orelse If BoolOpAnd NameLoad CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice Num orelse If BoolOpAnd NameLoad CompareNotIn NameLoad ListLoad Str Str Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse If BoolOpAnd NameLoad CompareEq NameLoad Str body Expr Call AttributeLoad NameLoad attr BinOpAdd Str SubscriptLoad NameLoad Slice Num Return NameLoad decorator_list AttributeLoad NameLoad attr ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Return BinOpAdd Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return ListLoad Str Str Str decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Return TupleLoad Num Call NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore TupleLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Dict Num ListLoad Num Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Assign NameStore Str orelse Assign NameStore Str Return BinOpMod Str TupleLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr orelse Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareNotIn Str AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr If BoolOpAnd CompareNotIn Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Dict Num ListLoad Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad If Call NameLoad NameLoad Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore ListComp Call NameLoad Call NameLoad NameLoad comprehension NameStore TupleLoad NameLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If UnaryOpNot CompareEqEqEqEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Raise Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Return Call NameLoad NameLoad NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad Assert CompareEq AttributeLoad NameLoad attr TupleLoad Assert CompareEq AttributeLoad NameLoad attr TupleLoad If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr TupleLoad body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Index Num NameLoad orelse If CompareEq NameLoad Num body If CompareEq NameLoad Num body Assign SubscriptStore NameLoad Slice Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq NameLoad Num body Assign SubscriptStore NameLoad Slice UnaryOpUSub Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign SubscriptStore NameLoad Slice BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq NameLoad Num body If CompareEq NameLoad Num body AugAssignAdd NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad orelse If CompareEq NameLoad Num body AugAssignSub NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad orelse AugAssignAdd NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad orelse AugAssignMult NameStore NameLoad AugAssignAdd NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad Assign SubscriptStore NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return ListLoad SubscriptLoad NameLoad Index Num decorator_list Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad If Call AttributeLoad AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr attr Str body Raise Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return BinOpAdd TupleLoad Num NameLoad orelse Return NameLoad decorator_list decorator_list Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If CompareIsNot NameLoad NameLoad body Assign NameStore CompareLtE Call NameLoad AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Return BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr If Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body While BoolOpAnd AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num If AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad NameLoad attr orelse Assign NameStore NameLoad If CompareIn SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Slice Num TupleLoad Str Str body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd CompareIn AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str Str CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num CompareIs SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad CompareIs SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd CompareIn AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str Str CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num CompareIs SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad body If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign TupleStore NameStore NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad If BoolOpAnd AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num attr Call NameLoad AttributeLoad AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num attr attr NameLoad body Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num If CompareEq AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr TupleLoad Num body Assign TupleStore NameStore NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num Str NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr Num Return TupleLoad NameLoad NameLoad If CompareEq AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr TupleLoad Num body Assign TupleStore NameStore NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Num NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr Num Return TupleLoad NameLoad NameLoad If CompareEq Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num body Assign TupleStore NameStore NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Str Str NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Call AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad If BoolOpAnd NameLoad Call NameLoad NameLoad NameLoad Num body Assign TupleStore NameStore NameStore NameStore NameStore NameStore AttributeLoad AttributeLoad NameLoad attr attr If Call NameLoad NameLoad NameLoad Num body Assign TupleStore NameStore NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad Call NameLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad NameLoad Num Return NameLoad If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad NameLoad BinOpAdd BinOpMult NameLoad NameLoad NameLoad Return NameLoad If CompareNotEq Num NameLoad body Assign NameStore ListLoad BinOpAdd BinOpMult NameLoad NameLoad Call NameLoad NameLoad BinOpMult NameLoad NameLoad NameLoad NameLoad BinOpMult NameLoad NameLoad Return NameLoad If NameLoad body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad orelse Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body FunctionDef arguments args NameParam defaults body If CompareEq NameLoad Num body Return NameLoad If CompareEq NameLoad Num body Return UnaryOpUSub NameLoad orelse Return BinOpMult NameLoad NameLoad decorator_list TryExcept body Expr AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad body Return NameLoad If BoolOpOr CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Num Num CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Str Str Str Str body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return NameLoad If BoolOpAnd NameLoad CompareGt Call NameLoad Call NameLoad NameLoad Str ListLoad NameLoad body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad NameLoad Num Expr Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num UnaryOpUSub NameLoad NameLoad Num orelse If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body For NameStore AttributeLoad AttributeLoad NameLoad attr attr body Expr Call NameLoad NameLoad NameLoad NameLoad Num orelse If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Expr Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num UnaryOpUSub NameLoad NameLoad Num orelse If BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore AttributeLoad AttributeLoad NameLoad attr attr body If Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body While BoolOpAnd AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num If AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad If CompareEq Call NameLoad NameLoad Num body Assert CompareEq Call NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq Call NameLoad NameLoad Num body Expr Call NameLoad NameLoad NameLoad NameLoad Num orelse If CompareEq Call NameLoad NameLoad Num body Expr Call NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Num orelse Expr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num NameLoad Num orelse If CompareEq Call NameLoad NameLoad Num body Assert CompareEq Call NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq Call NameLoad NameLoad Num body Expr Call NameLoad NameLoad NameLoad NameLoad Num orelse If CompareEq Call NameLoad NameLoad Num body Expr Call NameLoad NameLoad Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Num orelse Expr Call NameLoad NameLoad Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num NameLoad Num orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Num While CompareLt NameLoad BinOpSub Call NameLoad NameLoad Num body TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body AugAssignAdd NameStore Num Continue Assign NameStore BinOpAdd NameLoad Num While CompareLt NameLoad Call NameLoad NameLoad body TryExcept body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body AugAssignAdd NameStore Num Continue If CompareIs NameLoad NameLoad body Assign NameStore BinOpAdd NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad TupleLoad NameLoad NameLoad Delete SubscriptDel NameLoad Index NameLoad orelse AugAssignAdd NameStore Num AugAssignAdd NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore NameLoad body If Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body TryExcept body Assign TupleStore NameStore NameStore NameLoad handlers ExceptHandler type NameLoad body Return NameLoad If CompareEq NameLoad Num body Return NameLoad If CompareEq NameLoad Num body Return UnaryOpUSub NameLoad Return BinOpMult NameLoad NameLoad decorator_list For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad BinOpAdd NameLoad Num Call NameLoad NameLoad body Assign TupleStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Continue Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad If NameLoad body Assert CompareEq Call NameLoad NameLoad Num Assign NameStore ListComp Call NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad CompareNotIn NameLoad TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore ListLoad Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad CompareEq AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr body Return TupleLoad NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Return TupleLoad NameLoad BinOpSub NameLoad NameLoad Num Num decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num If AttributeLoad NameLoad attr body Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad While NameLoad body AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignAdd NameStore BinOpSub Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body If UnaryOpNot BoolOpAnd Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Continue If CompareNotIn NameLoad AttributeLoad NameLoad attr body Continue TryExcept body Assign TupleStore NameStore NameStore NameStore NameStore Call NameLoad NameLoad AugAssignAdd NameStore NameLoad AugAssignAdd NameStore NameLoad AugAssignAdd NameStore NameLoad handlers ExceptHandler type NameLoad body AugAssignAdd NameStore Num Continue If NameLoad body Assign TupleStore NameStore NameStore NameLoad Assert CompareEq Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad ListLoad NameLoad keyword Str keyword NameLoad Assign NameStore NameLoad AugAssignAdd NameStore Num handlers ExceptHandler type NameLoad body AugAssignAdd NameStore Num ExceptHandler type NameLoad body AugAssignAdd NameStore Num Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Assign NameStore BinOpSub AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpSub AttributeLoad NameLoad attr NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Assign SubscriptStore NameLoad Index NameLoad BinOpSub NameLoad SubscriptLoad NameLoad Index NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Dict Return TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Assign NameStore BinOpMult Str NameLoad Expr Call NameLoad NameLoad Str keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index Num keyword NameLoad If CompareGt SubscriptLoad NameLoad Index Num Num body Expr Call NameLoad NameLoad Str keyword NameLoad For NameStore Call NameLoad Call NameLoad SubscriptLoad NameLoad Index Num keyword Lambda arguments args NameParam defaults SubscriptLoad NameLoad Index Num body If CompareGt SubscriptLoad NameLoad Index Num Num body Expr Call NameLoad NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore TupleLoad Str Str Str Str If BoolOpOr CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Num CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad NameLoad If BoolOpOr CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr Num CompareNotIn AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Raise Call NameLoad NameLoad If CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Raise Call NameLoad Str Assign NameStore TupleLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore ListLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad TryExcept body Assign SubscriptStore NameLoad Index Num Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return ListLoad ListLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num decorator_list Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad If Call AttributeLoad AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr attr Str body Raise Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr If CompareLtE Call NameLoad Call AttributeLoad NameLoad attr Num body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return BinOpAdd TupleLoad Num NameLoad orelse Return NameLoad decorator_list decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body If UnaryOpNot Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If CompareNotEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return If CompareIn AttributeLoad AttributeLoad NameLoad attr attr ListLoad Str Str Str Str body If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num CompareEq AttributeLoad NameLoad attr Num body Return ListLoad Call NameLoad AttributeLoad NameLoad attr If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num CompareEq AttributeLoad NameLoad attr Num body Return ListLoad Call AttributeLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr Num Str attr Num If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num CompareEq AttributeLoad NameLoad attr Num body Return ListLoad Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr Str Num NameLoad attr Num If BoolOpAnd CompareEq AttributeLoad NameLoad attr Num CompareEq AttributeLoad NameLoad attr Num body Return ListLoad Call AttributeLoad Call NameLoad Call AttributeLoad NameLoad attr Str Num Call AttributeLoad NameLoad attr Num Str attr Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call NameLoad ListLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr NameLoad body Return ListLoad Call NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad ListLoad NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr NameLoad body Return ListLoad Call NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad ListLoad NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr NameLoad body Return ListLoad Call NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad ListLoad NameLoad keyword NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore NameStore AttributeLoad NameLoad attr If CompareEqEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num NameLoad Return ListLoad Call AttributeLoad NameLoad attr Str Num If CompareEqEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num NameLoad NameLoad Call AttributeLoad NameLoad attr Num NameLoad Return ListLoad Call AttributeLoad NameLoad attr Num Str decorator_list Call NameLoad ListLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore NameStore AttributeLoad NameLoad attr If BoolOpAnd SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Return If CompareEq NameLoad Num body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return ListLoad NameLoad orelse If CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return ListLoad NameLoad orelse Return decorator_list Call NameLoad ListLoad NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr NameLoad body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num keyword AttributeLoad NameLoad attr If BoolOpAnd SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num keyword AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad Return ListLoad NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Return ListLoad Call AttributeLoad NameLoad attr Str Num If BoolOpAnd SubscriptLoad NameLoad Index Num UnaryOpNot SubscriptLoad NameLoad Index Num UnaryOpNot SubscriptLoad NameLoad Index Num body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Return ListLoad Call AttributeLoad NameLoad attr Str Num If BoolOpAnd UnaryOpNot SubscriptLoad NameLoad Index Num UnaryOpNot SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Return ListLoad Call AttributeLoad NameLoad attr Num Str decorator_list Call NameLoad ListLoad NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Num Str Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Num Str Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad Num Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad keyword Num keyword NameLoad Num Str Assign NameStore Call NameLoad NameLoad NameLoad NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Str NameLoad Num Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Raise Call NameLoad AttributeLoad NameLoad attr NameLoad If UnaryOpNot CompareEqEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If BoolOpAnd UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Str body Raise Call NameLoad Str AttributeLoad NameLoad attr Assign NameStore ListLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore ListLoad Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return Call NameLoad NameLoad ListLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad TryExcept body Assign SubscriptStore NameLoad Index Num Call AttributeLoad NameLoad attr BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Raise decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return ListLoad ListLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Num SubscriptLoad SubscriptLoad NameLoad Index Num Index Num decorator_list Assign NameStore AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad If Call AttributeLoad AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr attr attr Str body Raise Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad AttributeLoad NameLoad attr attr If CompareLtE Call NameLoad Call AttributeLoad NameLoad attr Num body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Return BinOpAdd TupleLoad Num NameLoad orelse Return NameLoad decorator_list decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return NameLoad Assign NameStore ListComp BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr NameLoad comprehension NameStore AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad body Return NameLoad If CompareGt Call AttributeLoad NameLoad attr NameLoad Num body Pass Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore ListComp Call NameLoad NameLoad keyword AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad body Assign NameStore ListComp BoolOpAnd AttributeLoad NameLoad attr CompareEq AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Call NameLoad ListComp Call NameLoad NameLoad keyword AttributeLoad NameLoad attr comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpAnd Call NameLoad NameLoad keyword AttributeLoad NameLoad attr CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Break If CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad keyword AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assert UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad Assert CompareNotEq NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr CompareNotIn NameLoad TupleLoad NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension TupleStore NameStore NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr CompareNotEq NameLoad NameLoad Return ListLoad Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad NameLoad Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad AttributeLoad NameLoad attr body If BoolOpAnd CompareNotEq NameLoad NameLoad CompareIsNot SubscriptLoad NameLoad Index NameLoad NameLoad CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore NameLoad Break If CompareLt NameLoad Num body Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Return NameLoad Assert CompareLt NameLoad Call NameLoad AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assert UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr If CompareEq Call NameLoad NameLoad Num body Return ListLoad Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad orelse Return ListLoad Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num NameLoad NameLoad decorator_list Call NameLoad ListLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Num Str ClassDef bases NameLoad body Expr Str Assign NameStore TupleLoad FunctionDef arguments args NameParam defaults vararg body Assign NameStore Call NameLoad Call NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad If CompareNotIn AttributeLoad SubscriptLoad NameLoad Index Num attr TupleLoad Num Num body Raise Call NameLoad BinOpMod Str AttributeLoad SubscriptLoad NameLoad Index Num attr If CompareNotIn AttributeLoad SubscriptLoad NameLoad Index Num attr TupleLoad Num Num body Raise Call NameLoad BinOpMod Str AttributeLoad SubscriptLoad NameLoad Index Num attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListComp AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad Assign NameStore BinOpAdd BinOpAdd TupleLoad BoolOpOr SubscriptLoad AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr Index Num SubscriptLoad AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr Slice Num Num SubscriptLoad AttributeLoad AttributeLoad SubscriptLoad NameLoad Index Num attr attr Slice Num Return Call NameLoad NameLoad NameLoad ListLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad If CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Raise Call NameLoad BinOpMod Str TupleLoad Call AttributeLoad Str attr Call NameLoad NameLoad NameLoad Call AttributeLoad Str attr ListComp Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num comprehension NameStore NameLoad Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad Index Num Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Assign NameStore SubscriptStore NameLoad Index Num Call AttributeLoad NameLoad attr NameLoad keyword NameLoad For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Return BinOpAdd Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Return Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index Str If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpMod Str NameLoad Return Call AttributeLoad Str attr ListLoad Call AttributeLoad Str attr GeneratorExp Call AttributeLoad Str attr keyword NameLoad keyword NameLoad comprehension NameStore Call NameLoad NameLoad BinOpMod Str Call AttributeLoad Str attr GeneratorExp Call AttributeLoad Str attr keyword NameLoad keyword NameLoad comprehension NameStore Call NameLoad NameLoad decorator_list Assign TupleStore NameStore NameStore NameStore TupleLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Assign NameStore ListLoad BinOpMod Str NameLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assert CompareEq Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr GeneratorExp BinOpMod Str TupleLoad NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpMod Str Call NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore ListLoad TupleLoad NameLoad NameLoad TupleLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad Assign NameStore Call AttributeLoad Str attr NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore NameLoad Assign NameStore Call AttributeLoad Str attr GeneratorExp IfExp CompareIs NameLoad NameLoad Str BinOpMod Str TupleLoad NameLoad NameLoad comprehension NameStore NameLoad Return BinOpMod Str Call NameLoad decorator_list Assign NameStore ListLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Str orelse If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad TupleLoad Num NameLoad Num If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Str orelse If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad TupleLoad Num Num NameLoad If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Str orelse Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad TupleLoad Num IfExp CompareEq NameLoad Num NameLoad Num IfExp CompareEq NameLoad Num NameLoad Num Assign NameStore BinOpMod Call AttributeLoad Str attr NameLoad Call NameLoad Return BinOpMod Str Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body ImportFrom alias Return TupleLoad Num Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore NameLoad Assign TupleStore NameStore NameLoad Assign TupleStore NameStore NameStore NameStore TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr If CompareEq NameLoad Num body Assign NameStore BinOpMult Call AttributeLoad NameLoad attr Num Str NameLoad Assign NameStore BinOpMult Call AttributeLoad NameLoad attr Num Str NameLoad orelse If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Num Num Num Assign NameStore BinOpMult Call AttributeLoad NameLoad attr Num Num Str Call AttributeLoad NameLoad attr Num Str Num orelse If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Assign NameStore BinOpMult Call AttributeLoad NameLoad attr Num Num Str Call AttributeLoad NameLoad attr Num Str Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num NameLoad orelse If CompareEqEq NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Num Num Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Num Num NameLoad If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assert CompareEq Call NameLoad NameLoad Num Assert CompareEq Call NameLoad NameLoad Num If BoolOpAnd CompareIs SubscriptLoad NameLoad Index Num NameLoad CompareIs SubscriptLoad NameLoad Index Num NameLoad body Return ListLoad NameLoad Assign NameStore CompareNotEq AttributeLoad NameLoad attr Str If NameLoad body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore NameLoad TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore NameLoad If SubscriptLoad NameLoad Index Num body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore NameLoad If SubscriptLoad NameLoad Index Num body TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Assign NameStore NameLoad If NameLoad body Assign NameStore ListLoad NameLoad NameLoad Assign NameStore ListLoad NameLoad NameLoad For NameStore Call NameLoad Num body If BoolOpAnd CompareIsNot SubscriptLoad NameLoad Index NameLoad NameLoad CompareNotEq AttributeLoad SubscriptLoad NameLoad Index NameLoad attr AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body Raise Call NameLoad BinOpAdd BinOpAdd BinOpAdd BinOpAdd Str Call NameLoad NameLoad Str Call NameLoad NameLoad BinOpMod Str TupleLoad Call NameLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Call NameLoad AttributeLoad SubscriptLoad NameLoad Index NameLoad attr If SubscriptLoad NameLoad Index Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If SubscriptLoad NameLoad Index Num body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num If BoolOpAnd SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num body Return ListLoad BinOpAdd NameLoad NameLoad orelse If SubscriptLoad NameLoad Index Num body Return ListLoad NameLoad orelse Return ListLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For NameStore NameLoad body If CompareNotIn Call NameLoad NameLoad TupleLoad Num Num body Raise Call NameLoad Assign TupleStore NameStore NameStore NameLoad Return ListLoad BinOpAdd SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num decorator_list decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults body If CompareIn AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad decorator_list Call NameLoad ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr
N/A N/A Ops and optimizations for using BLAS calls

BLAS = Basic Linear Algebra Subroutines
Learn more about BLAS here:
    http://www.netlib.org/blas/blast-forum/
The standard BLAS libraries implement what is called "legacy BLAS" in that
document.

This documentation describes Theano's BLAS optimization pipeline.

Where there is a discrepancy between how things do work and how they *should*
work, both aspects should be documented.

There are four kinds of BLAS Ops in Theano:
    - Python implementations (this file)
    - SciPy-based (blas_scipy)
    - C-based (blas_c)
    - CUDA-based (theano.sandbox.cuda.blas)

Notes
-----
Unfortunately (because it's confusing) this file currently contains Ops
that contain both Python and C versions.  I think it would be better to
move the C implementations to blas_c so that this file is pure Python.
-JB


Ops
===

GEMM: Dot22, Dot22Scalar, GemmRelated, Gemm
-------------------------------------------

The BLAS GEMM operation implements Z <- a X Y + b Z,
where Z, X and Y are matrices, and a and b are scalars.

Dot22 is a GEMM where a=1, b=0, and Z is allocated every time.

Dot22Scalar is a GEMM where b=0 and Z is allocated every time.

Gemm is a GEMM in all its generality.

In the future we can refactor the GemmRelated, Gemm, Dot22 and
Dot22Scalar Ops into a single Op.  That new Op (Gemm2) is basically a
normal Gemm, but with an additional configuration variable that says
to ignore the input Z.  Setting that configuration variable to True
would make Gemm2 equivalent to the current Dot22 and Dot22Scalar.
This would make the file a lot easier to read, and save a few hundred
lines of library, to say nothing of testing and documentation.


GEMV: Gemv
----------

The BLAS GEMV operation implements Z <- a X Y + b Z,
where X is a matrix, Y, and Z are vectors, and a and b are scalars.


GER: Ger
--------

The BLAS GER operation implements Z <- a X' Y + Z,
where X and Y are vectors, and matrix Z gets a rank-1 update.


Other Notable BLAS-related Ops
------------------------------

SYRK is another useful special case of GEMM. Particularly SYRK preserves
symmetry in the matrix that it updates.  See how the linear-algebra module uses
symmetry hints before implementing this Op, so that this Op is compatible with
that system.


Optimizations
=============

The optimization pipeline works something like this:

    1. identify dot22 from dot
    2. identify gemm from dot22
    3. identify dot22scalar from dot22 that are not gemm
    4. specialize gemm to gemv where applicable
    5. specialize gemm to ger where applicable
    6. specialize dot22 -> gemv or ger where applicable

:note: GEMM is the most canonical BLAS signature that we deal with so far, it
    would be good to turn most things into GEMM (dot, inner, outer, dot22,
    dot22scalar), and then to specialize from gemm to the various other L2 and
    L3 operations.

Identify Dot22
--------------

Numpy's dot supports arguments that are of any rank, and we should support that
too (just for compatibility).  The BLAS optimizations work with Dot Ops whose
inputs are each either vector or matrix.  So the first part of the optimization
pipeline is to transform qualifying Dot Ops to Dot22 Ops. Dot22 Ops may be
transformed further, but they will get implemented by a BLAS call.

More precisely, Dot nodes whose inputs are all vectors or matrices and whose
inputs both have the same dtype, and whose dtype is float or complex, become
Dot22.  This is implemented in `local_dot_to_dot22`.


Identify Gemm from Dot22
------------------------

This is complicated, done in GemmOptimizer.

Identify Dot22Scalar from Dot22
-------------------------------

Dot22 Ops that remain after the GemmOptimizer is done have not
qualified as GEMM Ops. Still they might be scaled by a factor, in
which case we use Dot22Scalar which is like Gemm, but without the b
and the Z.  In the future it would be good to merge this into the
GemmOptimizer.

Specialize Gemm to Gemv
-----------------------

If arguments to GEMM are dimshuffled vectors, then we can use GEMV
instead. This optimization is `local_gemm_to_gemv`.

 __future__ absolute_import print_function division N/A copy N/A logging N/A os N/A time N/A numpy N/A numpy.distutils N/A N/A N/A numpy.distutils.__config__ N/A N/A N/A ImportError N/A N/A six iteritems six.moves reduce xrange theano config theano.gof utils Op view_roots local_optimizer Optimizer InconsistencyError toolbox SequenceDB EquilibriumOptimizer Apply ReplacementDidntRemovedError theano.printing pprint FunctionPrinter debugprint theano.compile.mode optdb N/A theano.scalar theano.tensor basic T theano.tensor.blas_headers blas_header_text theano.tensor.blas_headers blas_header_version theano.tensor.opt in2out local_dimshuffle_lift N/A _logger N/A N/A logging getLogger theano.tensor.blas N/A N/A N/A scipy.linalg.blas N/A have_fblas True N/A N/A N/A fblas N/A N/A N/A scipy linalg blas fblas N/A N/A N/A AttributeError N/A N/A fblas N/A N/A scipy linalg blas N/A _blas_gemv_fns N/A N/A N/A numpy dtype float32 N/A N/A numpy dtype float64 N/A N/A numpy dtype complex64 N/A N/A numpy dtype complex128 N/A fblas sgemv N/A fblas dgemv N/A fblas cgemv N/A fblas zgemv N/A N/A N/A ImportError N/A e N/A N/A have_fblas False N/A N/A N/A N/A config blas ldflags N/A N/A N/A N/A _logger warning Failed to import scipy.linalg.blas, and Theano flag blas.ldflags is empty. Falling back on slower implementations for dot(matrix, vector), dot(vector, matrix) and dot(vector, vector) (%s) N/A str e check_init_y N/A N/A N/A N/A N/A N/A N/A check_init_y _result None N/A N/A N/A have_fblas N/A N/A N/A check_init_y _result False N/A y N/A N/A float NaN N/A N/A numpy ones N/A 2 N/A x N/A N/A numpy ones N/A 2 N/A A N/A N/A numpy ones N/A 2 2 N/A gemv N/A _blas_gemv_fns N/A N/A y dtype N/A N/A gemv 1.0 N/A A T x 0.0 y overwrite_y True trans True N/A N/A check_init_y _result N/A N/A N/A N/A numpy isnan y any N/A N/A check_init_y _result N/A N/A N/A check_init_y _result None Gemv N/A Op N/A N/A 
    expression is beta * y + alpha * A x

    A is matrix
    x, y are vectors
    alpha, beta are scalars
    output is a vector that can be inplace on y

     N/A __props__ N/A inplace __init__ N/A N/A self inplace N/A N/A N/A N/A self inplace inplace N/A inplace N/A N/A N/A self destroy_map N/A 0 N/A 0 N/A __str__ N/A N/A self N/A N/A N/A N/A self inplace N/A N/A N/A %s{inplace} N/A N/A self __class__ __name__ N/A N/A N/A %s{no_inplace} N/A N/A self __class__ __name__ N/A make_node N/A N/A self y alpha A x beta N/A N/A N/A y N/A N/A T as_tensor_variable y N/A x N/A N/A T as_tensor_variable x N/A A N/A N/A T as_tensor_variable A N/A alpha N/A N/A T as_tensor_variable alpha N/A beta N/A N/A T as_tensor_variable beta N/A N/A N/A N/A y dtype N/A A dtype N/A N/A y dtype N/A x dtype N/A N/A N/A TypeError Gemv requires matching dtypes N/A N/A y dtype N/A A dtype N/A x dtype N/A N/A N/A A ndim 2 N/A N/A N/A TypeError gemv requires matrix for A N/A A type N/A N/A N/A x ndim 1 N/A N/A N/A TypeError gemv requires vector for x N/A x type N/A N/A N/A y ndim 1 N/A N/A N/A TypeError gemv requires vector for y N/A y type N/A N/A Apply self N/A y alpha A x beta N/A N/A N/A y type N/A perform N/A N/A self node inputs out_storage N/A N/A N/A N/A y alpha A x beta inputs N/A N/A have_fblas N/A N/A N/A y shape N/A 0 0 N/A N/A N/A x shape N/A 0 0 N/A N/A y dtype _blas_gemv_fns N/A N/A gemv N/A _blas_gemv_fns N/A N/A y dtype N/A N/A N/A N/A N/A A shape N/A 0 N/A N/A y shape N/A 0 N/A N/A N/A A shape N/A 1 N/A N/A x shape N/A 0 N/A N/A N/A ValueError N/A Incompatible shapes for gemv (beta * y + alpha * dot(A, x)). y: %s, A: %s, x: %s  N/A N/A y shape N/A A shape N/A x shape N/A N/A N/A beta 0 N/A check_init_y N/A N/A N/A N/A y fill 0 N/A N/A N/A out_storage N/A 0 N/A 0 N/A gemv alpha N/A A T x beta y overwrite_y N/A self inplace trans True N/A N/A out N/A N/A numpy dot A x N/A N/A alpha 1 N/A N/A out alpha N/A N/A beta 0 N/A N/A N/A beta 1 N/A N/A out N/A beta y N/A N/A out y N/A N/A N/A out_storage N/A 0 N/A 0 N/A N/A numpy asarray out dtype N/A y dtype N/A infer_shape N/A N/A self node input_shapes N/A N/A N/A N/A N/A input_shapes N/A 0 N/A N/A N/A gemv_no_inplace N/A Gemv inplace False N/A gemv_inplace N/A Gemv inplace True N/A gemv gemv_no_inplace Ger N/A Op N/A N/A 
    BLAS defines general rank-1 update GER as A <- A + alpha x y'

    for matrix A, scalar alpha, vectors x and y.

    This interface to GER allows non-destructive operation on A via the
    `destructive` argument to the constructor.

    :TODO: Create better classes ScipyGer and CGer that inherit from this class
    and override the make_thunk() method to use Scipy and C respectively.

     N/A __props__ N/A destructive __init__ N/A N/A self destructive N/A N/A N/A N/A self destructive destructive N/A destructive N/A N/A N/A self destroy_map N/A 0 N/A 0 N/A __str__ N/A N/A self N/A N/A N/A N/A self destructive N/A N/A N/A %s{destructive} N/A N/A self __class__ __name__ N/A N/A N/A %s{non-destructive} N/A N/A self __class__ __name__ N/A make_node N/A N/A self A alpha x y N/A N/A N/A A N/A N/A T as_tensor_variable A N/A y N/A N/A T as_tensor_variable y N/A x N/A N/A T as_tensor_variable x N/A alpha N/A N/A T as_tensor_variable alpha N/A N/A N/A len N/A set N/A N/A A dtype N/A alpha dtype N/A x dtype N/A y dtype 1 N/A N/A N/A TypeError ger requires matching dtypes N/A N/A A dtype N/A alpha dtype N/A x dtype N/A y dtype N/A N/A N/A alpha ndim 0 N/A N/A N/A TypeError ger requires scalar alpha N/A alpha type N/A N/A N/A A ndim 2 N/A N/A N/A TypeError ger requires matrix for A N/A A type N/A N/A N/A x ndim 1 N/A N/A N/A TypeError ger requires vector for x N/A x type N/A N/A N/A y ndim 1 N/A N/A N/A TypeError ger requires vector for y N/A y type N/A N/A N/A x dtype N/A float32 float64 complex64 complex128 N/A N/A N/A TypeError only float and complex types supported N/A x dtype N/A N/A Apply self N/A A alpha x y N/A N/A N/A A type N/A perform N/A N/A self node inp out N/A N/A N/A N/A cA calpha cx cy inp N/A N/A cZ out N/A N/A self destructive N/A N/A A cA N/A N/A A N/A N/A cA copy N/A N/A calpha 1 N/A N/A A N/A calpha N/A N/A numpy outer cx cy N/A N/A A N/A N/A numpy outer cx cy N/A N/A cZ N/A 0 A N/A infer_shape N/A N/A self node input_shapes N/A N/A N/A N/A N/A input_shapes N/A 0 N/A N/A N/A ger N/A Ger destructive False N/A ger_destructive N/A Ger destructive True ldflags N/A N/A libs flags libs_dir include_dir N/A True False False False N/A N/A Extract a list of compilation flags from config.blas.ldflags.

    Depending on the options, different type of flags will be kept.
    It returns a list of libraries against which an Op's object file
    should be linked to benefit from a BLAS implementation.

    Parameters
    ----------
    libs : bool, optional
        Extract flags starting with "-l" (the default is True).
    libs_dir : bool, optional
        Extract flags starting with "-L" (the default is False).
    include_dir : bool, optional
        Extract flags starting with "-I" (the default is False).
    flags: bool, optional
        Extract all the other flags (the default is False).

    Returns
    -------
    list of strings
        Extracted flags.

     N/A ldflags_str N/A N/A N/A theano config blas ldflags N/A N/A _ldflags ldflags_str ldflags_str libs libs flags flags libs_dir libs_dir include_dir include_dir N/A _ldflags N/A N/A ldflags_str libs flags libs_dir include_dir N/A N/A N/A Extract list of compilation flags from a string.

    Depending on the options, different type of flags will be kept.

    Parameters
    ----------
    ldflags_str : string
        The string to process. Typically, this will be the content of
        `theano.config.blas.ldflags`.
    libs : bool
        Extract flags starting with "-l".
    flags: bool
        Extract all the other flags.
    libs_dir: bool
        Extract flags starting with "-L".
    include_dir: bool
        Extract flags starting with "-I".

    Returns
    -------
    list of strings
        Extracted flags.

     N/A rval N/A N/A libs_dir N/A N/A found_dyn False N/A dirs N/A N/A x N/A 2 N/A x N/A N/A ldflags_str split N/A N/A x startswith -L N/A l N/A _ldflags ldflags_str ldflags_str libs True flags False libs_dir False include_dir False N/A d dirs N/A N/A f N/A N/A os listdir d N/A N/A N/A N/A N/A f endswith .so N/A N/A f endswith .dylib N/A N/A f endswith .dll N/A N/A N/A any N/A N/A N/A N/A f find ll 0 N/A ll l N/A N/A found_dyn True N/A N/A N/A found_dyn dirs N/A N/A N/A N/A _logger warning We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library. N/A t N/A N/A ldflags_str split N/A N/A N/A N/A N/A t startswith ' N/A N/A t startswith " N/A N/A t N/A t N/A 1 N/A N/A N/A N/A t endswith ' N/A N/A t endswith " N/A N/A t N/A t N/A -1 N/A N/A N/A N/A t0 t1 t2 N/A t N/A 0 3 N/A N/A t0 - N/A N/A N/A Exception N/A N/A N/A ValueError N/A invalid token "%s" in ldflags_str: "%s" N/A t ldflags_str N/A N/A libs_dir N/A t1 L N/A N/A N/A N/A rval append N/A t N/A 2 N/A N/A N/A include_dir N/A t1 I N/A N/A N/A ValueError Include dirs are not used for blas. We disable this as this can hide other headers and this is not wanted. t N/A N/A N/A rval append N/A t N/A 2 N/A N/A N/A libs N/A t1 l N/A N/A N/A N/A rval append N/A t N/A 2 N/A N/A N/A flags N/A t1 N/A L I l N/A N/A N/A N/A rval append t N/A N/A N/A flags N/A t1 L N/A N/A N/A N/A rval append N/A -Wl,-rpath, N/A t N/A 2 N/A rval N/A N/A utils memoize GemmRelated N/A Op N/A N/A Base class for Gemm and Dot22.

    This class provides a kind of templated gemm Op.

     N/A __props__ N/A c_support_code N/A N/A self N/A N/A N/A mod_str 
        #ifndef MOD
        #define MOD %
        #endif
        static double time_time() // a time function like time.time()
        {
            struct timeval tv;
            gettimeofday(&tv, 0);
            return (double) tv.tv_sec + (double) tv.tv_usec / 1000000.0;
        }
         N/A N/A N/A blas_header_text mod_str N/A c_headers N/A N/A self N/A N/A N/A N/A <iostream> <time.h> <sys/time.h> N/A c_libraries N/A N/A self N/A N/A N/A N/A ldflags N/A c_compile_args N/A N/A self N/A N/A N/A N/A ldflags libs False flags True N/A c_lib_dirs N/A N/A self N/A N/A N/A N/A ldflags libs False libs_dir True N/A c_header_dirs N/A N/A self N/A N/A N/A N/A ldflags libs False include_dir True N/A N/A declare_NS 
        int unit = 0;

        int type_num = PyArray_DESCR(%(_x)s)->type_num;
        int type_size = PyArray_DESCR(%(_x)s)->elsize; // in bytes

        npy_intp* Nx = PyArray_DIMS(%(_x)s);
        npy_intp* Ny = PyArray_DIMS(%(_y)s);
        npy_intp* Nz = 0; //PyArray_DIMS(%(_zout)s);

        npy_intp* Sx = PyArray_STRIDES(%(_x)s);
        npy_intp* Sy = PyArray_STRIDES(%(_y)s);
        npy_intp* Sz = 0; //PyArray_STRIDES(%(_zout)s);

        //strides for x, y, z in dimensions 0, 1
        int sx_0, sx_1, sy_0, sy_1, sz_0, sz_1;
         N/A check_xyz_rank2 
        if (PyArray_NDIM(%(_x)s) != 2) {
            PyErr_Format(PyExc_NotImplementedError,
                         "rank(x) != 2. rank(x) is %%d.",
                         PyArray_NDIM(%(_x)s));
            %(fail)s;
        }
        if (PyArray_NDIM(%(_y)s) != 2) {
            PyErr_Format(PyExc_NotImplementedError,
                         "rank(y) != 2. rank(y) is %%d.", PyArray_NDIM(%(_y)s));
            %(fail)s;
        }
        if (%(_zout)s && PyArray_NDIM(%(_zout)s) != 2) {
            PyErr_Format(PyExc_NotImplementedError,
                         "rank(z) != 2. rank(z) is %%d.", PyArray_NDIM(%(_zout)s));
            %(fail)s;
        }
         N/A check_xyz_double_or_float 
        if ((PyArray_DESCR(%(_x)s)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(%(_x)s)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(x) is not double or float"); %(fail)s;}

        if ((PyArray_DESCR(%(_y)s)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(%(_y)s)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(y) is not double or float"); %(fail)s;}

        if ((PyArray_DESCR(%(_zout)s)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(%(_zout)s)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(z) is not double or float"); %(fail)s;}

        if ((PyArray_DESCR(%(_x)s)->type_num != PyArray_DESCR(%(_y)s)->type_num)
            ||(PyArray_DESCR(%(_x)s)->type_num != PyArray_DESCR(%(_zout)s)->type_num))
        { PyErr_SetString(PyExc_NotImplementedError, "type(x), type(y), type(z) are not all the same"); %(fail)s; }
         N/A check_ab_double_or_float 
        if ((PyArray_DESCR(%(_a)s)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(%(_a)s)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(a) is not double or float"); %(fail)s;}

        if ((PyArray_DESCR(%(_b)s)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(%(_b)s)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(b) is not double or float"); %(fail)s;}
         N/A check_dims 
        if (Nx[0] != Nz[0])
        {
            PyErr_Format(PyExc_ValueError,
                "Shape mismatch: x has %%ld rows but z has %%ld rows",
                (long int)Nx[0], (long int)Nz[0]);
            %(fail)s;
        }
        if (Nx[1] != Ny[0])
        {
            PyErr_Format(PyExc_ValueError,
                "Shape mismatch: x has %%ld cols (and %%ld rows) but y has %%ld rows (and %%ld cols)",
                (long int)Nx[1], (long int)Nx[0], (long int)Ny[0], (long int)Ny[1]);
            %(fail)s;
        }
        if (Ny[1] != Nz[1])
        {
            PyErr_Format(PyExc_ValueError,
                "Shape mismatch: y has %%ld cols but z has %%ld cols",
                (long int)Ny[1], (long int)Nz[1]);
            %(fail)s;
        }

        // We must not raise an error when Nx[1] == 0. This would disable cases
        // that numpy.dot accept.
         N/A check_strides 
        /*
        If some matrices are not contiguous on either dimensions,
        or have invalid strides, copy their content into a contiguous one
        */
        if ((Sx[0] < 1) || (Sx[1] < 1) || (Sx[0] MOD type_size) || (Sx[1] MOD type_size)
            || ((Sx[0] != type_size) && (Sx[1] != type_size)))
        {
            PyArrayObject * _x_copy = (PyArrayObject *) PyArray_Copy(%(_x)s);
            if (!_x_copy)
                %(fail)s
            Py_XDECREF(%(_x)s);
            %(_x)s = _x_copy;
            Sx = PyArray_STRIDES(%(_x)s);
        }

        if ((Sy[0] < 1) || (Sy[1] < 1) || (Sy[0] MOD type_size) || (Sy[1] MOD type_size)
            || ((Sy[0] != type_size) && (Sy[1] != type_size)))
        {
            PyArrayObject * _y_copy = (PyArrayObject *) PyArray_Copy(%(_y)s);
            if (!_y_copy)
                %(fail)s
            Py_XDECREF(%(_y)s);
            %(_y)s = _y_copy;
            Sy = PyArray_STRIDES(%(_y)s);
        }

        if ((Sz[0] < 1) || (Sz[1] < 1) || (Sz[0] MOD type_size) || (Sz[1] MOD type_size)
            || ((Sz[0] != type_size) && (Sz[1] != type_size)))
        {
            PyArrayObject * _z_copy = (PyArrayObject *) PyArray_Copy(%(_zout)s);
            if (!_z_copy)
                %(fail)s
            Py_XDECREF(%(_zout)s);
            %(_zout)s = _z_copy;
            Sz = PyArray_STRIDES(%(_zout)s);
        }
         N/A encode_strides_in_unit 
        /*
        encode the stride structure of _x,_y,_zout into a single integer
        */
        unit |= ((Sx[1] == type_size || Nx[1]==1) ? 0x0 : (Sx[0] == type_size || Nx[0]==1) ? 0x1 : 0x2) << 8;
        unit |= ((Sy[1] == type_size || Ny[1]==1) ? 0x0 : (Sy[0] == type_size || Ny[0]==1) ? 0x1 : 0x2) << 4;
        unit |= ((Sz[1] == type_size || Nz[1]==1) ? 0x0 : (Sz[0] == type_size || Nz[0]==1) ? 0x1 : 0x2) << 0;
         N/A compute_strides 
        /* create appropriate strides for malformed matrices that are row or column
         * vectors, or empty matrices.
         * In that case, the value of the stride does not really matter, but
         * some versions of BLAS insist that:
         *  - they are not smaller than the number of elements in the array,
         *  - they are not 0.
         */
        sx_0 = (Nx[0] > 1) ? Sx[0]/type_size : (Nx[1] + 1);
        sx_1 = (Nx[1] > 1) ? Sx[1]/type_size : (Nx[0] + 1);
        sy_0 = (Ny[0] > 1) ? Sy[0]/type_size : (Ny[1] + 1);
        sy_1 = (Ny[1] > 1) ? Sy[1]/type_size : (Ny[0] + 1);
        sz_0 = (Nz[0] > 1) ? Sz[0]/type_size : (Nz[1] + 1);
        sz_1 = (Nz[1] > 1) ? Sz[1]/type_size : (Nz[0] + 1);
         N/A begin_switch_typenum 
        switch (type_num)
        {
         N/A case_float 
            case NPY_FLOAT:
            {
         N/A case_float_gemm 
                float* x = (float*)PyArray_DATA(%(_x)s);
                float* y = (float*)PyArray_DATA(%(_y)s);
                float* z = (float*)PyArray_DATA(%(_zout)s);
                char N = 'N';
                char T = 'T';
                int Nz0 = Nz[0], Nz1 = Nz[1], Nx1 = Nx[1];
                //std::cerr << (unit/256) MOD 16 << (unit / 16) MOD 16 << unit MOD 16<< '\n';
                //double t0 = time_time();
                switch(unit)
                {
                    case 0x000: sgemm_(&N, &N, &Nz1, &Nz0, &Nx1, &a, y, &sy_0, x, &sx_0, &b, z, &sz_0); break;
                    case 0x100: sgemm_(&N, &T, &Nz1, &Nz0, &Nx1, &a, y, &sy_0, x, &sx_1, &b, z, &sz_0); break;
                    case 0x010: sgemm_(&T, &N, &Nz1, &Nz0, &Nx1, &a, y, &sy_1, x, &sx_0, &b, z, &sz_0); break;
                    case 0x110: sgemm_(&T, &T, &Nz1, &Nz0, &Nx1, &a, y, &sy_1, x, &sx_1, &b, z, &sz_0); break;
                    case 0x001: sgemm_(&T, &T, &Nz0, &Nz1, &Nx1, &a, x, &sx_0, y, &sy_0, &b, z, &sz_1); break;
                    case 0x101: sgemm_(&N, &T, &Nz0, &Nz1, &Nx1, &a, x, &sx_1, y, &sy_0, &b, z, &sz_1); break;
                    case 0x011: sgemm_(&T, &N, &Nz0, &Nz1, &Nx1, &a, x, &sx_0, y, &sy_1, &b, z, &sz_1); break;
                    case 0x111: sgemm_(&N, &N, &Nz0, &Nz1, &Nx1, &a, x, &sx_1, y, &sy_1, &b, z, &sz_1); break;
                    default: PyErr_SetString(PyExc_ValueError, "some matrix has no unit stride"); %(fail)s;
                };
                //fprintf(stderr, "Calling sgemm %%i %%i %%i %%i took %%f\n", unit, Nz1, Nz0, Nx1, time_time() - t0);
         N/A case_double 
            }
            break;
            case NPY_DOUBLE:
            {
         N/A case_double_gemm 
                double* x = (double*)PyArray_DATA(%(_x)s);
                double* y = (double*)PyArray_DATA(%(_y)s);
                double* z = (double*)PyArray_DATA(%(_zout)s);
                char N = 'N';
                char T = 'T';
                int Nz0 = Nz[0], Nz1 = Nz[1], Nx1 = Nx[1];
                //std::cerr << (unit/256) MOD 16 << (unit / 16) MOD 16 << unit MOD 16<< '\n';
                //double t0 = time_time();
                //fprintf(stderr, "unit=%%x N= %%i %%i %%i S = %%i %%i %%i %%i %%i %%i\n", unit,
                //Nz1, Nz0, Nx1,
                //sy_0, sy_1,
                //sx_0, sx_1,
                //sz_0, sz_1
                //);
                switch(unit)
                {
                    case 0x000: dgemm_(&N, &N, &Nz1, &Nz0, &Nx1, &a, y,
                                       &sy_0, x, &sx_0, &b, z, &sz_0); break;
                    case 0x100: dgemm_(&N, &T, &Nz1, &Nz0, &Nx1, &a, y,
                                       &sy_0, x, &sx_1, &b, z, &sz_0); break;
                    case 0x010: dgemm_(&T, &N, &Nz1, &Nz0, &Nx1, &a, y,
                                       &sy_1, x, &sx_0, &b, z, &sz_0); break;
                    case 0x110: dgemm_(&T, &T, &Nz1, &Nz0, &Nx1, &a, y,
                                       &sy_1, x, &sx_1, &b, z, &sz_0); break;
                    case 0x001: dgemm_(&T, &T, &Nz0, &Nz1, &Nx1, &a, x,
                                       &sx_0, y, &sy_0, &b, z, &sz_1); break;
                    case 0x101: dgemm_(&N, &T, &Nz0, &Nz1, &Nx1, &a, x,
                                       &sx_1, y, &sy_0, &b, z, &sz_1); break;
                    case 0x011: dgemm_(&T, &N, &Nz0, &Nz1, &Nx1, &a, x,
                                       &sx_0, y, &sy_1, &b, z, &sz_1); break;
                    case 0x111: dgemm_(&N, &N, &Nz0, &Nz1, &Nx1, &a, x,
                                       &sx_1, y, &sy_1, &b, z, &sz_1); break;
                    default: PyErr_SetString(PyExc_ValueError,
                                             "some matrix has no unit stride");
                             %(fail)s;
                };
                //fprintf(stderr, "Calling dgemm %%i %%i %%i %%i took %%f\n",
                //        unit, Nz1, Nz0, Nx1, time_time()- t0);
         N/A end_switch_typenum 
            }
            break;
        }
         build_gemm_call N/A N/A self N/A N/A N/A N/A reduce N/A str __add__ N/A N/A self declare_NS N/A self check_xyz_rank2 N/A self setup_z_Nz_Sz N/A self check_xyz_double_or_float N/A self check_ab_double_or_float N/A self check_dims N/A self check_strides N/A self encode_strides_in_unit N/A self compute_strides N/A self begin_switch_typenum N/A self case_float N/A self case_float_ab_constants N/A self case_float_gemm N/A self case_double N/A self case_double_ab_constants N/A self case_double_gemm N/A self end_switch_typenum N/A build_gemm_version N/A N/A self N/A N/A N/A N/A 13 N/A blas_header_version N/A N/A Gemm N/A GemmRelated N/A N/A In-place version of matrix-matrix multiplication (with accumulation).

    When a and b are scalars and x, y, and z are matrices, then

        gemm(z,a,x,y,b)

    is similar to

        b*z + a*dot(x,y)

    The difference between the two is that the top form is destructive
    on z, whereas the bottom form is not.  Gemm works in-place on the
    storage associated with z, and the L{Variable} returned by Gemm
    has a storage that will be aliased to the storage of the z
    argument. Because of this in-place computation, an L{Apply} of
    this op will destroy the L{Variable} z on which it operates.  (See
    L{DestructiveOps} for an explanation of what destroying means in
    the context of theano graphs. See L{BlasLapackSupport} for more
    optimized linear algebra operations.)

     N/A E_rank gemm only works for rank 2 N/A E_scalar gemm requires scalar argument N/A E_z_uniq argument z aliased to x or y N/A E_mixed gemm requires matching dtypes N/A E_float gemm requires floating-point dtypes N/A __props__ N/A inplace __init__ N/A N/A self inplace N/A N/A N/A N/A self inplace inplace N/A N/A self inplace N/A N/A N/A self destroy_map N/A 0 N/A 0 N/A N/A self setup_z_Nz_Sz N/A self setup_z_Nz_Sz_inplace N/A N/A N/A self setup_z_Nz_Sz N/A self setup_z_Nz_Sz_outplace N/A __str__ N/A N/A self N/A N/A N/A N/A self inplace N/A N/A inplace_str inplace N/A N/A inplace_str no_inplace N/A N/A %s{%s} N/A N/A N/A self __class__ __name__ inplace_str N/A __setstate__ N/A N/A self dct N/A N/A N/A N/A N/A N/A self __dict__ update dct N/A N/A self inplace N/A N/A N/A self setup_z_Nz_Sz N/A self setup_z_Nz_Sz_inplace N/A N/A N/A self setup_z_Nz_Sz N/A self setup_z_Nz_Sz_outplace N/A N/A _op_use_c_code N/A self __dict__ N/A N/A N/A self _op_use_c_code N/A N/A theano config cxx N/A N/A N/A destroy_map N/A self __dict__ N/A self inplace N/A N/A N/A self destroy_map N/A 0 N/A 0 N/A __getstate__ N/A N/A self N/A N/A N/A rval N/A N/A N/A self __dict__ copy N/A N/A N/A rval pop setup_z_Nz_Sz N/A rval N/A make_node N/A N/A self N/A inputs N/A N/A inputs N/A list N/A map N/A T as_tensor_variable inputs N/A N/A N/A len inputs 5 N/A N/A N/A TypeError N/A Wrong number of inputs for %s (expected 5, got %s) N/A self N/A len inputs N/A N/A z a x y b inputs N/A N/A getattr z cached False N/A N/A z N/A N/A copy copy z N/A N/A zr xr yr N/A N/A set N/A view_roots i N/A i N/A z x y N/A N/A N/A zr intersection xr N/A N/A N/A InconsistencyError N/A Gemm E_z_uniq N/A z x N/A N/A N/A zr intersection yr N/A N/A N/A InconsistencyError N/A Gemm E_z_uniq N/A z y N/A N/A N/A z ndim 2 N/A N/A N/A TypeError N/A Gemm E_rank z N/A N/A N/A a ndim 0 N/A N/A N/A TypeError N/A Gemm E_scalar a N/A N/A N/A x ndim 2 N/A N/A N/A TypeError N/A Gemm E_rank x N/A N/A N/A y ndim 2 N/A N/A N/A TypeError N/A Gemm E_rank y N/A N/A N/A b ndim 0 N/A N/A N/A TypeError N/A Gemm E_scalar b N/A N/A N/A N/A z dtype N/A a dtype N/A x dtype N/A y dtype N/A b dtype N/A N/A N/A TypeError N/A Gemm E_mixed N/A N/A z dtype N/A a dtype N/A x dtype N/A y dtype N/A b dtype N/A N/A N/A N/A N/A N/A z dtype startswith float N/A N/A N/A N/A z dtype startswith complex N/A N/A N/A TypeError N/A Gemm E_float N/A z dtype N/A output N/A N/A z type N/A N/A Apply self inputs N/A output N/A perform N/A N/A self node inp out N/A N/A N/A N/A z a x y b inp N/A N/A zout out N/A N/A N/A a shape N/A N/A N/A N/A b shape N/A N/A N/A N/A self inplace N/A N/A z N/A N/A z copy N/A N/A N/A z shape N/A N/A N/A N/A N/A z itemset N/A N/A z a N/A b N/A N/A numpy dot x y N/A N/A zout N/A 0 z N/A N/A N/A b 0.0 N/A N/A N/A a 1.0 N/A N/A N/A z N/A N/A N/A numpy dot x y N/A N/A N/A a -1.0 N/A N/A N/A z N/A N/A N/A N/A numpy dot x y N/A N/A N/A z N/A N/A a N/A N/A numpy dot x y N/A N/A N/A b 1.0 N/A N/A N/A a 1.0 N/A N/A z N/A N/A numpy dot x y N/A N/A N/A a -1.0 N/A N/A z N/A N/A numpy dot x y N/A N/A z N/A a N/A N/A numpy dot x y N/A N/A z b N/A z N/A a N/A N/A numpy dot x y N/A N/A zout N/A 0 z N/A infer_shape N/A N/A self node input_shapes N/A N/A N/A N/A N/A input_shapes N/A 0 N/A N/A setup_z_Nz_Sz_inplace 
        if (%(_zout)s != %(_z)s)
        {
            if (%(_zout)s)
            {
                Py_DECREF(%(_zout)s);
            }
            %(_zout)s = %(_z)s;
            Py_INCREF(%(_zout)s);
        }
        Nz = PyArray_DIMS(%(_z)s);
        Sz = PyArray_STRIDES(%(_z)s);
         N/A setup_z_Nz_Sz_outplace 
        if ((NULL == %(_zout)s)
            || (PyArray_DIMS(%(_zout)s)[0] != PyArray_DIMS(%(_z)s)[0])
            || (PyArray_DIMS(%(_zout)s)[1] != PyArray_DIMS(%(_z)s)[1])
            || (PyArray_STRIDES(%(_zout)s)[0] <= 0)
            || (PyArray_STRIDES(%(_zout)s)[1] <= 0)
            || (PyArray_STRIDES(%(_zout)s)[0] MOD type_size)
            || (PyArray_STRIDES(%(_zout)s)[1] MOD type_size)
            || ((PyArray_STRIDES(%(_zout)s)[0] != type_size)
                && (PyArray_STRIDES(%(_zout)s)[1] != type_size)))
        {
            Py_XDECREF(%(_zout)s);
            npy_intp dims[2];
            dims[0] = PyArray_DIMS(%(_z)s)[0];
            dims[1] = PyArray_DIMS(%(_z)s)[1];
            %(_zout)s = (PyArrayObject*)PyArray_SimpleNew(2, dims,
                                                          PyArray_TYPE(%(_z)s));
            //fprintf(stderr, "Gemm Allocating %%i %%i\n", dims[0], dims[1]);
            if(!%(_zout)s) {
                PyErr_SetString(PyExc_MemoryError,
                                "failed to alloc gemm_no_inplace output");
                %(fail)s
            }
        }
        Nz = PyArray_DIMS(%(_zout)s);
        Sz = PyArray_STRIDES(%(_zout)s);

        if (PyArray_DESCR(%(_zout)s)->type_num == NPY_FLOAT)
        {
            float * zoutdata = (float*)PyArray_DATA(%(_zout)s);
            int zoi = Sz[0] / sizeof(float);
            int zoj = Sz[1] / sizeof(float);
            const float * zdata = (float*)PyArray_DATA(%(_z)s);
            int zi = PyArray_STRIDES(%(_z)s)[0]/sizeof(float);
            int zj = PyArray_STRIDES(%(_z)s)[1]/sizeof(float);
            for (int i = 0; i < Nz[0]; ++i)
            {
                for (int j = 0; j < Nz[1]; ++j)
                {
                    zoutdata[zoi*i + zoj*j] = zdata[zi*i + zj*j];
                }
            }
        }
        else if (PyArray_DESCR(%(_zout)s)->type_num == NPY_DOUBLE)
        {
            double * zoutdata = (double*) PyArray_DATA(%(_zout)s);
            int zoi = Sz[0] / sizeof(double);
            int zoj = Sz[1] / sizeof(double);
            const double * zdata = (double*)PyArray_DATA(%(_z)s);
            int zi = PyArray_STRIDES(%(_z)s)[0]/sizeof(double);
            int zj = PyArray_STRIDES(%(_z)s)[1]/sizeof(double);
            for (int i = 0; i < Nz[0]; ++i)
            {
                for (int j = 0; j < Nz[1]; ++j)
                {
                    zoutdata[zoi*i + zoj*j] = zdata[zi*i + zj*j];
                }
            }
        }
        else
        {
            PyErr_SetString(PyExc_AssertionError,
                            "neither float nor double dtype");
            %(fail)s
        }
         N/A case_float_ab_constants 
        #define REAL float
        float a = (PyArray_DESCR(%(_a)s)->type_num == NPY_FLOAT)
        ? (REAL)(((float*)PyArray_DATA(%(_a)s))[0])
        : (REAL)(((double*)PyArray_DATA(%(_a)s))[0]);
        float b = (PyArray_DESCR(%(_b)s)->type_num == NPY_FLOAT) ?
        (REAL)(((float*)PyArray_DATA(%(_b)s))[0])
        : (REAL)(((double*)PyArray_DATA(%(_b)s))[0]);
        #undef REAL
         N/A case_double_ab_constants 
        #define REAL double
        double a = (PyArray_DESCR(%(_a)s)->type_num == NPY_FLOAT)
        ? (REAL)(((float*)PyArray_DATA(%(_a)s))[0])
        : (REAL)(((double*)PyArray_DATA(%(_a)s))[0]);
        double b = (PyArray_DESCR(%(_b)s)->type_num == NPY_FLOAT) ?
        (REAL)(((float*)PyArray_DATA(%(_b)s))[0])
        : (REAL)(((double*)PyArray_DATA(%(_b)s))[0]);
        #undef REAL
         c_code N/A N/A self node name inp out sub N/A N/A N/A N/A _z _a _x _y _b inp N/A N/A _zout out N/A N/A N/A N/A N/A N/A N/A node inputs N/A 0 type dtype startswith complex N/A N/A N/A N/A utils MethodNotDefined N/A %s.c_code N/A N/A self __class__ __name__ N/A N/A N/A N/A config blas ldflags N/A N/A N/A N/A N/A super Gemm self c_code node name N/A _z _a _x _y _b N/A _zout sub N/A full_code N/A N/A N/A self build_gemm_call N/A dict N/A locals sub N/A full_code N/A c_code_cache_version N/A N/A self N/A N/A N/A gv N/A N/A self build_gemm_version N/A gv N/A N/A N/A N/A 5 gv N/A N/A gv N/A N/A N/A gemm_inplace N/A Gemm inplace True N/A gemm_no_inplace N/A Gemm inplace False N/A gemm gemm_no_inplace N/A N/A N/A pprint assign gemm_inplace N/A FunctionPrinter gemm_inplace N/A N/A N/A pprint assign gemm_no_inplace N/A FunctionPrinter gemm_no_inplace res_is_a N/A N/A node op maxclients N/A None N/A N/A N/A maxclients None N/A N/A retval N/A N/A len N/A node clients maxclients N/A N/A retval True N/A N/A N/A node owner N/A N/A N/A node owner op op retval N/A _as_scalar N/A N/A res dtype N/A None N/A N/A Return None or a TensorVariable whose type is in T.float_scalar_types N/A N/A dtype None N/A N/A dtype N/A config floatX N/A N/A N/A numpy all N/A N/A res type broadcastable N/A N/A N/A N/A res owner N/A isinstance N/A N/A res owner op N/A T DimShuffle N/A N/A res N/A N/A N/A res owner inputs N/A 0 N/A N/A N/A res type broadcastable N/A N/A rval N/A N/A res dimshuffle N/A N/A rval res N/A N/A N/A N/A N/A rval type dtype N/A 3 N/A int uin N/A N/A N/A N/A N/A N/A theano scalar upcast N/A res dtype dtype dtype N/A N/A N/A N/A T cast rval dtype N/A N/A None N/A rval N/A _is_real_matrix N/A N/A res N/A N/A N/A N/A N/A N/A N/A res type dtype N/A float32 float64 N/A N/A N/A res type ndim 2 N/A N/A N/A N/A res type broadcastable N/A 0 False N/A N/A N/A N/A res type broadcastable N/A 1 False N/A _is_real_vector N/A N/A res N/A N/A N/A N/A N/A N/A N/A res type dtype N/A float32 float64 N/A N/A N/A res type ndim 1 N/A N/A N/A N/A res type broadcastable N/A 0 False N/A _beta_L_plus_alpha_M N/A N/A beta L alpha M recurse_flip N/A True N/A N/A N/A N/A M owner N/A N/A N/A M owner op _dot22 N/A N/A N/A Ml Mr N/A N/A M owner inputs N/A rval N/A N/A gemm_no_inplace L alpha Ml Mr beta N/A N/A rval M N/A N/A N/A M owner N/A isinstance N/A N/A M owner op N/A T DimShuffle N/A N/A N/A N/A M owner inputs N/A 0 owner N/A isinstance N/A N/A N/A N/A N/A M owner inputs N/A 0 owner op Dot22 N/A N/A MM N/A N/A N/A M owner inputs N/A 0 N/A N/A N/A N/A N/A M owner op new_order N/A 0 N/A N/A N/A MMl MMr N/A N/A MM owner inputs N/A g N/A gemm_no_inplace N/A N/A L dimshuffle 0 x alpha MMl MMr beta N/A rval N/A N/A N/A g dimshuffle 0 N/A N/A rval MM N/A N/A N/A N/A N/A M owner op new_order N/A 1 N/A N/A N/A MMl MMr N/A N/A MM owner inputs N/A g N/A gemm_no_inplace N/A N/A L dimshuffle x 0 alpha MMl MMr beta N/A rval N/A N/A N/A g dimshuffle 1 N/A N/A rval MM N/A N/A N/A len N/A N/A N/A M owner op new_order 0 N/A N/A N/A MMl MMr N/A N/A MM owner inputs N/A g N/A gemm_no_inplace N/A N/A L dimshuffle x x alpha MMl MMr beta N/A rval N/A N/A N/A g dimshuffle N/A N/A rval MM N/A N/A False N/A res_is_a M gemm_no_inplace 1 N/A N/A N/A G a u v b N/A N/A M owner inputs N/A N/A res_is_a G _dot22 1 N/A N/A N/A x y N/A N/A G owner inputs N/A rval N/A N/A gemm_no_inplace N/A gemm_no_inplace L N/A alpha b x y beta N/A alpha a u v 1.0 N/A rval N/A N/A G L N/A N/A rval N/A N/A gemm_no_inplace L N/A alpha a u v N/A N/A alpha b beta N/A rval N/A N/A 1.0 alpha N/A N/A rval N/A N/A N/A beta L N/A gemm_no_inplace G N/A alpha a u v N/A alpha b N/A rval N/A recurse_flip N/A N/A N/A _beta_L_plus_alpha_M alpha M beta L recurse_flip False N/A N/A N/A False False N/A _gemm_canonicalize N/A N/A r scale rval maxclients N/A N/A scaled N/A N/A thing N/A N/A N/A N/A scale 1 N/A N/A thing N/A N/A scale -1 N/A N/A N/A thing N/A N/A N/A scale thing N/A N/A N/A N/A N/A N/A r type broadcastable N/A N/A N/A Exception N/A N/A None N/A N/A N/A N/A N/A r type ndim N/A 1 2 N/A N/A N/A r type dtype N/A float32 float64 complex64 complex128 N/A N/A N/A N/A rval append N/A scaled r N/A rval N/A N/A maxclients N/A N/A len N/A getattr r clients N/A maxclients N/A N/A N/A N/A rval append N/A scale r N/A rval N/A N/A N/A r owner N/A N/A N/A r owner op N/A T sub N/A N/A N/A _gemm_canonicalize N/A N/A N/A r owner inputs N/A 0 scale rval 1 N/A N/A _gemm_canonicalize N/A N/A N/A r owner inputs N/A 1 N/A scale rval 1 N/A N/A N/A N/A r owner N/A N/A N/A r owner op N/A T add N/A N/A i N/A N/A r owner inputs N/A N/A N/A _gemm_canonicalize i scale rval 1 N/A N/A N/A N/A r owner N/A N/A N/A r owner op N/A T neg N/A N/A N/A _gemm_canonicalize N/A N/A N/A r owner inputs N/A 0 N/A scale rval 1 N/A N/A N/A N/A r owner N/A N/A N/A r owner op N/A T mul N/A N/A scalars N/A N/A vectors N/A N/A matrices N/A N/A i N/A N/A r owner inputs N/A N/A N/A N/A numpy all N/A N/A i type broadcastable N/A N/A N/A N/A i owner N/A isinstance N/A N/A i owner op N/A T DimShuffle N/A N/A i N/A N/A N/A i owner inputs N/A 0 N/A N/A N/A i type broadcastable N/A N/A N/A N/A scalars append N/A N/A i dimshuffle N/A N/A N/A N/A scalars append i N/A N/A N/A _is_real_vector i N/A N/A N/A N/A vectors append i N/A N/A N/A _is_real_matrix i N/A N/A N/A N/A matrices append i N/A N/A N/A N/A rval append N/A scale r N/A rval N/A N/A N/A len matrices 1 N/A N/A N/A N/A len vectors 0 N/A m N/A matrices N/A 0 N/A N/A N/A len scalars 0 N/A N/A N/A _gemm_canonicalize m scale rval 1 N/A N/A N/A N/A len scalars 1 N/A N/A N/A _gemm_canonicalize m N/A scaled N/A scalars N/A 0 rval 1 N/A N/A N/A _gemm_canonicalize m N/A N/A T mul N/A scaled N/A scalars N/A 0 N/A scalars N/A 1 rval 1 N/A N/A N/A N/A len vectors 1 N/A N/A N/A N/A len matrices 0 N/A v N/A vectors N/A 0 N/A N/A N/A len scalars 0 N/A N/A N/A _gemm_canonicalize v scale rval 1 N/A N/A N/A N/A len scalars 1 N/A N/A N/A _gemm_canonicalize v N/A scaled N/A scalars N/A 0 rval 1 N/A N/A N/A _gemm_canonicalize v N/A N/A T mul N/A scaled N/A scalars N/A 0 N/A scalars N/A 1 rval 1 N/A N/A N/A N/A rval append N/A scale r N/A N/A N/A N/A rval append N/A scale r N/A rval N/A _factor_canonicalized N/A N/A lst N/A N/A N/A lst N/A list lst N/A i 0 N/A N/A i N/A N/A len lst 1 N/A N/A N/A N/A N/A s_i M_i N/A lst N/A i N/A N/A N/A Exception N/A N/A i 1 N/A N/A j N/A i 1 N/A N/A j N/A len lst N/A N/A N/A N/A N/A s_j M_j N/A lst N/A j N/A N/A N/A Exception N/A N/A j 1 N/A N/A N/A M_i M_j N/A N/A s_i N/A s_i s_j N/A N/A lst N/A i N/A s_i M_i N/A N/A lst N/A j N/A N/A j 1 N/A i 1 N/A lst N/A _gemm_from_factored_list N/A N/A lst N/A N/A N/A 
    Returns None, or a list to replace node.outputs.

     N/A lst2 N/A N/A sM lst N/A N/A N/A isinstance sM tuple N/A N/A N/A sm0 sm1 sM N/A sm0 N/A N/A T as_tensor_variable sm0 N/A N/A N/A N/A N/A theano scalar upcast N/A sm0 dtype N/A sm1 dtype N/A sm1 dtype N/A N/A N/A N/A lst2 append N/A N/A N/A T cast sm0 N/A sm1 dtype N/A sM N/A 1 N/A lst lst2 item_to_var N/A N/A t N/A N/A N/A N/A N/A N/A s M t N/A N/A N/A Exception N/A N/A t N/A N/A s 1 N/A N/A M N/A N/A s -1 N/A N/A N/A M N/A N/A s M N/A N/A i N/A xrange N/A N/A len lst 1 N/A N/A N/A s_i M_i N/A lst N/A i N/A j N/A xrange N/A i 1 N/A len lst N/A N/A N/A s_j M_j N/A lst N/A j N/A N/A N/A M_i type N/A M_j type N/A N/A N/A N/A gemm_of_sM_list old_dot22 N/A _beta_L_plus_alpha_M s_i M_i s_j M_j N/A gemm_of_sM_list N/A N/A N/A N/A len gemm_of_sM_list 1 N/A add_inputs N/A N/A item_to_var input N/A N/A k input N/A enumerate lst N/A k N/A i j N/A N/A N/A add_inputs extend gemm_of_sM_list N/A N/A N/A len add_inputs 1 N/A N/A rval N/A N/A N/A T add add_inputs N/A N/A rval add_inputs N/A N/A rval old_dot22 N/A _gemm_from_node2 N/A N/A node N/A N/A N/A 
    :todo: In many expressions, there are many ways to turn it into a
        gemm.  For example dot(a,b) + c + d.  This function should
        return all of them, so that if one version of gemm causes a
        cycle in the graph, then another application of gemm can be
        tried.

     N/A lst N/A N/A t0 N/A N/A time time N/A N/A _gemm_canonicalize N/A N/A node outputs N/A 0 1.0 lst 0 N/A t1 N/A N/A time time N/A N/A N/A len lst 1 N/A N/A lst N/A _factor_canonicalized lst N/A t2 N/A N/A time time N/A rval N/A _gemm_from_factored_list lst N/A t3 N/A N/A time time N/A N/A rval N/A N/A N/A N/A rval N/A 0 N/A 0 type N/A N/A N/A node outputs N/A 0 type N/A N/A N/A rval N/A t1 t0 N/A t2 t1 N/A t3 t2 N/A N/A None N/A t1 t0 0 0 N/A GemmOptimizer N/A Optimizer N/A N/A Graph optimizer for inserting Gemm operations. __init__ N/A N/A self N/A N/A N/A N/A N/A Optimizer __init__ self N/A N/A self warned False N/A add_requirements N/A N/A self fgraph N/A N/A N/A N/A N/A fgraph attach_feature N/A N/A toolbox ReplaceValidate N/A apply N/A N/A self fgraph N/A N/A N/A did_something True N/A nb_iter 0 N/A nb_replacement 0 N/A nb_replacement_didn_t_remove 0 N/A nb_inconsistency_make 0 N/A nb_inconsistency_replace 0 N/A time_canonicalize 0 N/A time_factor_can 0 N/A time_factor_list 0 N/A time_toposort 0 N/A N/A fgraph profile N/A N/A validate_before N/A N/A fgraph profile validate_time N/A callbacks_before N/A N/A N/A fgraph execute_callbacks_times copy N/A callback_before N/A fgraph execute_callbacks_time on_import N/A N/A new_node N/A N/A N/A N/A new_node node N/A N/A N/A N/A nodelist append new_node N/A N/A u N/A N/A N/A N/A theano gof opt Updater on_import None None N/A N/A N/A fgraph attach_feature u N/A did_something N/A N/A nb_iter 1 N/A t0 N/A N/A time time N/A nodelist N/A N/A N/A N/A theano gof graph io_toposort N/A fgraph inputs N/A fgraph outputs N/A time_toposort N/A N/A N/A time time t0 N/A did_something False N/A N/A N/A nodelist reverse N/A node nodelist N/A N/A N/A N/A N/A isinstance N/A node op N/A T Elemwise N/A isinstance N/A N/A node op scalar_op N/A N/A N/A theano scalar Add N/A N/A theano scalar Sub N/A N/A theano scalar Neg N/A N/A theano scalar Mul N/A N/A N/A N/A node N/A fgraph apply_nodes N/A N/A N/A N/A N/A N/A new_outputs time1 time2 time3 N/A _gemm_from_node2 node N/A time_canonicalize time1 N/A time_factor_can time2 N/A time_factor_list time3 N/A N/A N/A InconsistencyError N/A N/A nb_inconsistency_make 1 N/A N/A new_outputs N/A N/A N/A new_outputs old_dot22 new_outputs N/A N/A N/A len new_outputs N/A len N/A node outputs N/A N/A N/A N/A N/A fgraph replace_all_validate_remove N/A list N/A zip N/A node outputs new_outputs N/A old_dot22 reason GemmOptimizer warn False N/A did_something True N/A nb_replacement 1 N/A N/A N/A InconsistencyError N/A N/A nb_inconsistency_replace 1 N/A N/A ReplacementDidntRemovedError N/A N/A nb_replacement_didn_t_remove 1 N/A N/A self warned True N/A N/A N/A fgraph remove_feature u N/A N/A fgraph profile N/A N/A validate_time N/A N/A N/A fgraph profile validate_time validate_before N/A callback_time N/A N/A fgraph execute_callbacks_time callback_before N/A callbacks_time N/A N/A N/A k v N/A iteritems N/A fgraph execute_callbacks_times N/A N/A N/A k callbacks_before N/A N/A N/A callbacks_time N/A k N/A v N/A callbacks_before N/A k N/A N/A N/A callbacks_time N/A k v N/A N/A validate_time None N/A callback_time None N/A callbacks_time N/A N/A N/A self nb_iter nb_replacement nb_replacement_didn_t_remove nb_inconsistency_make nb_inconsistency_replace time_canonicalize time_factor_can time_factor_list time_toposort validate_time callback_time callbacks_time N/A print_profile N/A N/A stream prof level N/A 0 N/A N/A blanc N/A level N/A N/A print blanc GemmOptimizer file stream N/A N/A print blanc  nb_iter N/A prof N/A 1 file stream N/A N/A print blanc  nb_replacement N/A prof N/A 2 file stream N/A N/A print blanc  nb_replacement_didn_t_remove N/A prof N/A 3 file stream N/A N/A print blanc  nb_inconsistency_make N/A prof N/A 4 file stream N/A N/A print blanc  nb_inconsistency_replace N/A prof N/A 5 file stream N/A N/A print blanc  time_canonicalize N/A prof N/A 6 file stream N/A N/A print blanc  time_factor_can N/A prof N/A 7 file stream N/A N/A print blanc  time_factor_list N/A prof N/A 8 file stream N/A N/A print blanc  time_toposort N/A prof N/A 9 file stream N/A N/A print blanc  validate_time N/A prof N/A 10 file stream N/A N/A print blanc  callback_time N/A prof N/A 11 file stream N/A N/A N/A prof N/A 11 1 N/A N/A N/A print blanc  callbacks_time file stream N/A i N/A sorted N/A iteritems N/A prof N/A 12 key N/A N/A N/A a N/A N/A a N/A 1 N/A N/A N/A N/A i N/A 1 0 N/A N/A N/A print i N/A staticmethod N/A Dot22 N/A GemmRelated N/A N/A Compute a matrix-matrix product.

    This is a specialization of the more general Dot().

     make_node N/A N/A self x y N/A N/A N/A dtypes N/A float32 float64 complex64 complex128 N/A N/A N/A N/A N/A x type ndim 2 N/A N/A N/A x type dtype dtypes N/A N/A N/A TypeError x N/A N/A N/A N/A N/A y type ndim 2 N/A N/A N/A y type dtype dtypes N/A N/A N/A TypeError y N/A N/A N/A N/A y type dtype N/A N/A x type dtype N/A N/A N/A TypeError dtype mismatch to Dot22 N/A bz N/A N/A N/A N/A x type broadcastable N/A 0 N/A N/A N/A y type broadcastable N/A 1 N/A outputs N/A N/A N/A T tensor N/A N/A x type dtype bz N/A N/A Apply self N/A x y outputs N/A perform N/A N/A self node inp out N/A N/A N/A N/A x y inp N/A N/A z out N/A N/A N/A N/A z N/A 0 N/A N/A numpy asarray N/A N/A numpy dot x y N/A N/A N/A ValueError N/A e N/A N/A N/A e args N/A N/A e args N/A N/A x shape N/A y shape N/A N/A infer_shape N/A N/A self node input_shapes N/A N/A N/A N/A N/A N/A N/A input_shapes N/A 0 N/A 0 N/A N/A input_shapes N/A 1 N/A 1 N/A N/A setup_z_Nz_Sz 
        if ((NULL == %(_zout)s)
            || (PyArray_DIMS(%(_zout)s)[0] != PyArray_DIMS(%(_x)s)[0])
            || (PyArray_DIMS(%(_zout)s)[1] != PyArray_DIMS(%(_y)s)[1]))
        {
            if (NULL != %(_zout)s) Py_XDECREF(%(_zout)s);
            npy_intp dims[2];
            dims[0] = PyArray_DIMS(%(_x)s)[0];
            dims[1] = PyArray_DIMS(%(_y)s)[1];
            %(_zout)s = (PyArrayObject*)PyArray_SimpleNew(2, dims,
                            PyArray_TYPE(%(_x)s));
            //fprintf(stderr, "Dot Allocating %%i %%i\n", dims[0], dims[1]);
            if(!%(_zout)s) {
                PyErr_SetString(PyExc_MemoryError,
                                "failed to alloc dot22 output");
                %(fail)s
            }
        }
        Nz = PyArray_DIMS(%(_zout)s);
        Sz = PyArray_STRIDES(%(_zout)s);

         N/A check_ab_double_or_float N/A case_float_ab_constants 
                float a = 1.0;
                float b = 0.0;
         N/A case_double_ab_constants 
                double a = 1.0;
                double b = 0.0;
         c_code N/A N/A self node name inp out sub N/A N/A N/A N/A _x _y inp N/A N/A _zout out N/A N/A N/A N/A N/A N/A N/A node inputs N/A 0 type dtype startswith complex N/A N/A N/A N/A utils MethodNotDefined N/A %s.c_code N/A N/A self __class__ __name__ N/A N/A N/A len N/A N/A self c_libraries 0 N/A N/A N/A N/A N/A super Dot22 self c_code node name N/A _x _y N/A _zout sub N/A full_code N/A N/A N/A self build_gemm_call N/A dict N/A locals sub N/A full_code N/A c_code_cache_version N/A N/A self N/A N/A N/A gv N/A N/A self build_gemm_version N/A gv N/A N/A N/A N/A 2 gv N/A N/A gv N/A N/A N/A _dot22 N/A Dot22 local_dot_to_dot22 N/A N/A node N/A N/A N/A N/A N/A isinstance N/A node op N/A T Dot N/A N/A N/A N/A x y N/A node inputs N/A N/A N/A N/A y type dtype N/A N/A x type dtype N/A N/A N/A N/A _logger info Not optimizing dot with inputs %s %s %s %s x y N/A x type N/A y type N/A N/A N/A N/A N/A y type dtype N/A float32 float64 complex64 complex128 N/A N/A N/A N/A N/A x ndim 2 N/A N/A y ndim 2 N/A N/A N/A N/A _dot22 N/A node inputs N/A N/A N/A N/A x ndim 2 N/A N/A y ndim 1 N/A N/A N/A N/A N/A N/A _dot22 x N/A N/A y dimshuffle 0 x dimshuffle 0 N/A N/A N/A N/A x ndim 1 N/A N/A y ndim 2 N/A N/A N/A N/A N/A N/A _dot22 N/A N/A x dimshuffle x 0 y dimshuffle 1 N/A N/A N/A N/A x ndim 1 N/A N/A y ndim 1 N/A N/A N/A N/A N/A N/A _dot22 N/A N/A x dimshuffle x 0 N/A N/A y dimshuffle 0 x dimshuffle N/A N/A N/A _logger info Not optimizing dot with inputs %s %s %s %s x y N/A x type N/A y type N/A N/A local_optimizer N/A N/A T Dot local_inplace_gemm N/A N/A node N/A N/A N/A N/A N/A node op gemm_no_inplace N/A N/A N/A N/A gemm_inplace N/A node inputs N/A N/A local_optimizer N/A gemm_no_inplace inplace True local_inplace_gemv N/A N/A node N/A N/A N/A N/A N/A node op gemv_no_inplace N/A N/A N/A N/A gemv_inplace N/A node inputs N/A N/A local_optimizer N/A gemv_no_inplace inplace True local_inplace_ger N/A N/A node N/A N/A N/A N/A N/A node op ger N/A N/A N/A N/A ger_destructive N/A node inputs N/A N/A local_optimizer N/A ger inplace True local_gemm_to_gemv N/A N/A node N/A N/A N/A GEMM acting on row or column matrices -> GEMV. N/A N/A N/A node op gemm_no_inplace N/A N/A N/A z a x y b N/A node inputs N/A N/A N/A z broadcastable N/A x broadcastable N/A True False N/A N/A r N/A gemv_no_inplace N/A N/A z dimshuffle 1 a N/A y T N/A N/A x dimshuffle 1 b N/A N/A N/A N/A r dimshuffle x 0 N/A N/A N/A z broadcastable N/A y broadcastable N/A False True N/A N/A r N/A gemv_no_inplace N/A N/A z dimshuffle 0 a x N/A N/A y dimshuffle 0 b N/A N/A N/A N/A r dimshuffle 0 x N/A N/A local_optimizer N/A gemm_no_inplace local_gemm_to_ger N/A N/A node N/A N/A N/A GEMM computing an outer-product -> GER. N/A N/A N/A node op gemm_no_inplace N/A N/A N/A z a x y b N/A node inputs N/A N/A N/A N/A x broadcastable N/A 1 N/A N/A y broadcastable N/A 0 N/A N/A xv N/A N/A x dimshuffle 0 N/A yv N/A N/A y dimshuffle 1 N/A N/A N/A bval N/A N/A T get_scalar_constant_value b N/A N/A N/A N/A T NotScalarConstantError N/A N/A N/A N/A bval 1 N/A N/A rval N/A ger z a xv yv N/A N/A rval N/A N/A N/A bval 0 N/A N/A zeros N/A N/A T zeros N/A N/A N/A x shape N/A 0 N/A N/A y shape N/A 1 N/A x dtype N/A rval N/A ger zeros a xv yv N/A N/A rval N/A N/A N/A N/A local_optimizer N/A gemm_no_inplace local_dot22_to_ger_or_gemv N/A N/A node N/A N/A N/A dot22 computing an outer-product -> GER. N/A N/A N/A node op _dot22 N/A N/A N/A x y N/A node inputs N/A xb N/A x broadcastable N/A yb N/A y broadcastable N/A one N/A N/A T as_tensor_variable N/A N/A numpy asarray 1 dtype N/A x dtype N/A zero N/A N/A T as_tensor_variable N/A N/A numpy asarray 0 dtype N/A x dtype N/A N/A N/A xb N/A 1 N/A yb N/A 0 N/A N/A xv N/A N/A x dimshuffle 0 N/A yv N/A N/A y dimshuffle 1 N/A zeros N/A N/A T zeros N/A N/A N/A x shape N/A 0 N/A N/A y shape N/A 1 dtype N/A x dtype N/A rval N/A ger zeros one xv yv N/A N/A rval N/A N/A N/A xb N/A 0 N/A yb N/A 1 N/A N/A xv N/A N/A x dimshuffle 1 N/A zeros N/A N/A N/A T AllocEmpty N/A x dtype 1 N/A rval N/A gemv_no_inplace zeros one N/A y T xv zero N/A N/A N/A N/A rval dimshuffle x 0 N/A N/A N/A xb N/A 0 N/A N/A yb N/A 0 N/A N/A yb N/A 1 N/A N/A xv N/A N/A x dimshuffle 1 N/A zeros N/A N/A N/A T AllocEmpty N/A x dtype N/A N/A y shape N/A 1 N/A rval N/A gemv_no_inplace zeros one N/A y T xv zero N/A N/A N/A N/A rval dimshuffle x 0 N/A N/A N/A N/A xb N/A 0 N/A N/A xb N/A 1 N/A yb N/A 1 N/A N/A yv N/A N/A y dimshuffle 0 N/A zeros N/A N/A N/A T AllocEmpty N/A x dtype N/A N/A x shape N/A 0 N/A rval N/A gemv_no_inplace zeros one x yv zero N/A N/A N/A N/A rval dimshuffle 0 x N/A N/A local_optimizer N/A _dot22 N/A blas_optdb N/A SequenceDB N/A N/A N/A optdb register BlasOpt blas_optdb 1.7 fast_run fast_compile N/A N/A N/A blas_optdb register local_dot_to_dot22 N/A in2out local_dot_to_dot22 0 fast_run fast_compile N/A N/A N/A blas_optdb register gemm_optimizer N/A GemmOptimizer 10 fast_run N/A N/A N/A blas_optdb register local_gemm_to_gemv N/A EquilibriumOptimizer N/A local_gemm_to_gemv local_gemm_to_ger local_dot22_to_ger_or_gemv local_dimshuffle_lift max_use_ratio 5 ignore_newtrees False 15 fast_run N/A blas_opt_inplace N/A in2out local_inplace_gemm local_inplace_gemv local_inplace_ger name blas_opt_inplace N/A N/A N/A optdb register InplaceBlasOpt blas_opt_inplace 70.0 fast_run inplace blas_opt_inplace Dot22Scalar N/A GemmRelated N/A N/A Compute a matrix-matrix product.

    This is a specialization of the more general Dot()
    Used to call optimized gemm implementation.
    Also used to generate a gemm later.
    compute scalar*dot(x,y).

     make_node N/A N/A self x y a N/A N/A N/A N/A N/A a ndim 0 N/A N/A N/A TypeError N/A Gemm E_scalar a N/A N/A N/A x ndim 2 N/A N/A N/A TypeError N/A Gemm E_rank x N/A N/A N/A y ndim 2 N/A N/A N/A TypeError N/A Gemm E_rank y N/A N/A N/A N/A a dtype N/A x dtype N/A y dtype N/A N/A N/A TypeError Dot22Scalar requires matching dtypes N/A N/A a dtype N/A x dtype N/A y dtype N/A N/A N/A N/A N/A N/A a dtype startswith float N/A N/A N/A N/A a dtype startswith complex N/A N/A N/A TypeError Dot22Scalar requires float or complex args N/A a dtype N/A bz N/A N/A N/A N/A x type broadcastable N/A 0 N/A N/A N/A y type broadcastable N/A 1 N/A outputs N/A N/A N/A T tensor N/A N/A x type dtype bz N/A N/A Apply self N/A x y a outputs N/A perform N/A N/A self node inp out N/A N/A N/A N/A x y scalar inp N/A N/A z out N/A N/A N/A N/A z N/A 0 N/A N/A numpy asarray N/A scalar N/A N/A numpy dot x y N/A N/A N/A ValueError N/A e N/A N/A N/A e args N/A N/A e args N/A N/A x shape N/A y shape N/A N/A infer_shape N/A N/A self node input_shapes N/A N/A N/A N/A N/A N/A N/A input_shapes N/A 0 N/A 0 N/A N/A input_shapes N/A 1 N/A 1 N/A N/A setup_z_Nz_Sz N/A Dot22 setup_z_Nz_Sz N/A check_ab_double_or_float 
        if ((PyArray_DESCR(%(_a)s)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(%(_a)s)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError,
                         "type(a) is not double or float"); %(fail)s;}

         N/A case_float_ab_constants 
        #define REAL float
        float a = (PyArray_DESCR(%(_a)s)->type_num == NPY_FLOAT)
        ? (REAL)(((float*)PyArray_DATA(%(_a)s))[0])
        : (REAL)(((double*)PyArray_DATA(%(_a)s))[0]);
        #undef REAL
        float b = 0.0;
         N/A case_double_ab_constants 
        #define REAL double
        double a = (PyArray_DESCR(%(_a)s)->type_num == NPY_FLOAT)
        ? (REAL)(((float*)PyArray_DATA(%(_a)s))[0])
        : (REAL)(((double*)PyArray_DATA(%(_a)s))[0]);
        #undef REAL
        double b = 0.0;
         c_code N/A N/A self node name inp out sub N/A N/A N/A N/A _x _y _a inp N/A N/A _zout out N/A N/A N/A N/A N/A N/A N/A node inputs N/A 0 type dtype startswith complex N/A N/A N/A N/A utils MethodNotDefined N/A %s.c_code N/A N/A self __class__ __name__ N/A N/A N/A len N/A N/A self c_libraries 0 N/A N/A N/A N/A N/A super Dot22Scalar self c_code node name N/A _x _y N/A _zout sub N/A full_code N/A N/A N/A self build_gemm_call N/A dict N/A locals sub N/A full_code N/A c_code_cache_version N/A N/A self N/A N/A N/A gv N/A N/A self build_gemm_version N/A gv N/A N/A N/A N/A 2 gv N/A N/A gv N/A N/A N/A _dot22scalar N/A Dot22Scalar local_dot22_to_dot22scalar N/A N/A node N/A N/A N/A 
    Notes
    -----
    Previous attempts to alter this optimization to replace dot22 with
    gemm instead of dot22scalar resulted in some Scan nodes being
    duplicated and the ScanSaveMem optimization never running on them,
    resulting in highly increased memory usage. Until this issue is
    resolved, this optimization should keep using dot22scalar instead of
    gemm.

    We upcast the scalar if after the multiplication with the dot this give
    the same type.

    We execute this optimizer after the gemm optimizer. This
    allow to give more priority to gemm that give more speed up
    then this optimizer, but allow the gemm optimizer to ignore
    this op.

    TODO: support when we can reorder the mul to generate a
    dot22scalar or fix the canonizer to merge them(1 mul with multiple
    inputs)

     N/A N/A N/A node op N/A T mul N/A N/A False N/A i_dot22 N/A N/A N/A x owner N/A N/A N/A x owner op _dot22 N/A x N/A node inputs N/A N/A N/A any i_dot22 N/A N/A False N/A N/A N/A N/A i_dot22 count True 1 N/A N/A N/A dot22_idx N/A N/A i_dot22 index True N/A d N/A N/A node inputs N/A dot22_idx N/A i_scalar N/A N/A _as_scalar x dtype N/A d dtype N/A x N/A node inputs N/A N/A N/A any i_scalar N/A N/A i_mul N/A N/A N/A x owner N/A N/A N/A x owner op N/A T mul N/A any N/A N/A _as_scalar x_i dtype N/A d dtype N/A x_i N/A N/A x owner inputs N/A x N/A node inputs N/A N/A N/A any i_mul N/A N/A False N/A mul_idx N/A N/A i_mul index True N/A m N/A N/A node inputs N/A mul_idx N/A scalar_idx -1 N/A N/A i x N/A enumerate N/A N/A m owner inputs N/A N/A N/A N/A _as_scalar x dtype N/A d dtype N/A N/A N/A N/A theano scalar upcast N/A N/A x type dtype N/A N/A d type dtype N/A N/A d type dtype N/A N/A scalar_idx i N/A N/A N/A scalar_idx 0 N/A N/A N/A N/A _logger info Not optimizing dot22 with inputs %s %s, as the type of the scalar cannot be upcasted to the matrix type N/A node inputs N/A N/A x type N/A x N/A node inputs N/A False N/A a N/A N/A T cast N/A _as_scalar N/A N/A N/A m owner inputs N/A scalar_idx dtype N/A d dtype N/A N/A d type dtype N/A N/A N/A N/A a type ndim N/A dot N/A _dot22scalar N/A N/A N/A d owner inputs N/A 0 N/A N/A N/A d owner inputs N/A 1 a N/A N/A dot22_idx mul_idx N/A other_factors N/A inpt N/A N/A i inpt N/A enumerate N/A node inputs N/A i N/A dot22_idx mul_idx N/A other_m_inputs N/A inpt N/A N/A i inpt N/A enumerate N/A N/A m owner inputs N/A i scalar_idx N/A N/A N/A N/A T mul dot N/A other_factors other_m_inputs N/A scalar_idx -1 N/A N/A i x N/A enumerate N/A node inputs N/A N/A N/A N/A i dot22_idx N/A N/A i_scalar N/A i None N/A N/A N/A N/A theano scalar upcast N/A N/A x type dtype N/A N/A d type dtype N/A N/A d type dtype N/A N/A scalar_idx i N/A N/A N/A scalar_idx 0 N/A N/A N/A N/A _logger info Not optimizing dot22 with inputs %s %s, as the type of the scalar cannot be upcasted to the matrix type N/A node inputs N/A N/A x type N/A x N/A node inputs N/A False N/A N/A scalar_idx N/A len N/A node inputs N/A s N/A N/A node inputs N/A scalar_idx N/A o N/A N/A copy copy N/A node inputs N/A N/A N/A o remove d N/A N/A N/A o remove s N/A a N/A N/A T cast N/A i_scalar N/A scalar_idx N/A N/A d type dtype N/A N/A N/A N/A a type ndim N/A N/A N/A len o 0 N/A N/A N/A N/A _dot22scalar N/A N/A N/A d owner inputs N/A 0 N/A N/A N/A d owner inputs N/A 1 a N/A N/A N/A N/A N/A T mul N/A _dot22scalar N/A N/A N/A d owner inputs N/A 0 N/A N/A N/A d owner inputs N/A 1 a o N/A N/A local_optimizer N/A N/A T mul N/A N/A N/A blas_optdb register local_dot22_to_dot22scalar N/A in2out local_dot22_to_dot22scalar 11 fast_run BatchedDot N/A Op N/A N/A 
    Computes the batched dot product of two variables:

        batched_dot(a, b)[i] = dot(a[i], b[i])
     N/A __props__ N/A make_node N/A N/A self N/A inputs N/A N/A inputs N/A list N/A map N/A T as_tensor_variable inputs N/A N/A N/A len inputs 2 N/A N/A N/A TypeError N/A theano.tensor.blas.BatchedDot: 2 arguments required, %d given  N/A len inputs N/A N/A N/A N/A inputs N/A 0 ndim N/A 2 3 N/A N/A N/A TypeError N/A theano.tensor.blas.BatchedDot: input 0 (0-indexed) must have ndim of 2 or 3, %d given. Consider calling theano.tensor.batched_dot instead. N/A N/A inputs N/A 0 ndim N/A N/A N/A N/A inputs N/A 1 ndim N/A 2 3 N/A N/A N/A TypeError N/A theano.tensor.blas.BatchedDot: input 1 (0-indexed) must have ndim of 2 or 3, %d given. Consider calling theano.tensor.batched_dot instead. N/A N/A inputs N/A 1 ndim N/A dtype N/A N/A N/A theano scalar upcast N/A N/A N/A input type dtype N/A input inputs N/A upcasted_inputs N/A N/A N/A T cast input dtype N/A input inputs N/A broadcastable N/A N/A N/A N/A N/A N/A N/A N/A inputs N/A 0 type broadcastable N/A 0 N/A N/A N/A N/A inputs N/A 1 type broadcastable N/A 0 N/A N/A N/A N/A inputs N/A 0 type broadcastable N/A 1 -1 N/A N/A N/A N/A inputs N/A 1 type broadcastable N/A 2 N/A N/A Apply self upcasted_inputs N/A N/A N/A T tensor dtype broadcastable N/A perform N/A N/A self node inp out N/A N/A N/A N/A x y inp N/A N/A z out N/A N/A N/A N/A x shape N/A 0 N/A N/A y shape N/A 0 N/A N/A N/A TypeError N/A theano.tensor.blas.BatchedDot: inputs [%s] must have the same size in axis 0, but have sizes [%s]. N/A N/A N/A ,  join N/A map str inp N/A N/A ,  join N/A N/A str N/A N/A i shape N/A 0 N/A i inp N/A shape N/A N/A N/A self infer_shape node N/A N/A i shape N/A i inp N/A 0 N/A dtype N/A N/A N/A node outputs N/A 0 dtype N/A z0 N/A z N/A 0 N/A N/A numpy empty shape dtype dtype N/A i N/A xrange N/A N/A z0 shape N/A 0 N/A N/A N/A z0 N/A i N/A N/A numpy dot N/A x N/A i N/A y N/A i N/A c_support_code N/A N/A self N/A N/A N/A batch_gemm_defn 
        template<typename dtype, typename function>
        bool batch_gemm(function gemm, int type_size,
                        PyArrayObject* xs, PyArrayObject* ys, PyArrayObject* zs) {
            npy_intp *Nx = PyArray_DIMS(xs), *Sx = PyArray_STRIDES(xs);
            npy_intp *Ny = PyArray_DIMS(ys), *Sy = PyArray_STRIDES(ys);
            npy_intp *Nz = PyArray_DIMS(zs), *Sz = PyArray_STRIDES(zs);

            if (Nx[0] != Ny[0]) {
                PyErr_Format(PyExc_ValueError,
                             "Shape mismatch: batch sizes unequal."
                             " x.shape is (%d, %d, %d),"
                             " y.shape is (%d, %d, %d).",
                             Nx[0], Nx[1], Nx[2],
                             Ny[0], Ny[1], Ny[2]);
                return 1;
            }

            if (Nx[2] != Ny[1]) {
                PyErr_Format(PyExc_ValueError,
                             "Shape mismatch: summation axis sizes unequal."
                             " x.shape is (%d, %d, %d),"
                             " y.shape is (%d, %d, %d).",
                             Nx[0], Nx[1], Nx[2],
                             Ny[0], Ny[1], Ny[2]);
                return 1;
            }

            /* encode the stride structure of _x,_y,_z into a single integer. */
            int unit = 0;
            unit |= ((Sx[2] == type_size || Nx[2] == 1) ? 0x0 : (Sx[1] == type_size || Nx[1]==1) ? 0x1 : 0x2) << 8;
            unit |= ((Sy[2] == type_size || Ny[2] == 1) ? 0x0 : (Sy[1] == type_size || Ny[1]==1) ? 0x1 : 0x2) << 4;
            unit |= ((Sz[2] == type_size || Nz[2] == 1) ? 0x0 : (Sz[1] == type_size || Nz[1]==1) ? 0x1 : 0x2) << 0;

            /* create appropriate strides for malformed matrices that are row or column
             * vectors, or empty matrices.
             * In that case, the value of the stride does not really matter, but
             * some versions of BLAS insist that:
             *  - they are not smaller than the number of elements in the array,
             *  - they are not 0.
             */
            int sx_1 = (Nx[1] > 1) ? Sx[1]/type_size : (Nx[2] + 1);
            int sx_2 = (Nx[2] > 1) ? Sx[2]/type_size : (Nx[1] + 1);
            int sy_1 = (Ny[1] > 1) ? Sy[1]/type_size : (Ny[2] + 1);
            int sy_2 = (Ny[2] > 1) ? Sy[2]/type_size : (Ny[1] + 1);
            int sz_1 = (Nz[1] > 1) ? Sz[1]/type_size : (Nz[2] + 1);
            int sz_2 = (Nz[2] > 1) ? Sz[2]/type_size : (Nz[1] + 1);

            dtype* x = (dtype*)PyArray_DATA(xs);
            dtype* y = (dtype*)PyArray_DATA(ys);
            dtype* z = (dtype*)PyArray_DATA(zs);

            dtype a = 1.0;
            dtype b = 0.0;
            char N = 'N';
            char T = 'T';
            int Nz1 = Nz[1], Nz2 = Nz[2], Nx2 = Nx[2];

            // loop over batch axis
            for (int i = 0; i < Nz[0]; i++) {
                switch(unit)
                {
                    case 0x000: gemm(&N, &N, &Nz2, &Nz1, &Nx2, &a, y, &sy_1, x, &sx_1, &b, z, &sz_1); break;
                    case 0x100: gemm(&N, &T, &Nz2, &Nz1, &Nx2, &a, y, &sy_1, x, &sx_2, &b, z, &sz_1); break;
                    case 0x010: gemm(&T, &N, &Nz2, &Nz1, &Nx2, &a, y, &sy_2, x, &sx_1, &b, z, &sz_1); break;
                    case 0x110: gemm(&T, &T, &Nz2, &Nz1, &Nx2, &a, y, &sy_2, x, &sx_2, &b, z, &sz_1); break;
                    case 0x001: gemm(&T, &T, &Nz1, &Nz2, &Nx2, &a, x, &sx_1, y, &sy_1, &b, z, &sz_2); break;
                    case 0x101: gemm(&N, &T, &Nz1, &Nz2, &Nx2, &a, x, &sx_2, y, &sy_1, &b, z, &sz_2); break;
                    case 0x011: gemm(&T, &N, &Nz1, &Nz2, &Nx2, &a, x, &sx_1, y, &sy_2, &b, z, &sz_2); break;
                    case 0x111: gemm(&N, &N, &Nz1, &Nz2, &Nx2, &a, x, &sx_2, y, &sy_2, &b, z, &sz_2); break;
                    default: PyErr_SetString(PyExc_ValueError, "some matrix has no unit stride"); return 1;
                };
                x += Sx[0] / type_size;
                y += Sy[0] / type_size;
                z += Sz[0] / type_size;
            }

            return 0;
        }
         N/A N/A N/A blas_header_text batch_gemm_defn N/A c_libraries N/A N/A self N/A N/A N/A N/A ldflags N/A c_compile_args N/A N/A self N/A N/A N/A N/A ldflags libs False flags True N/A c_lib_dirs N/A N/A self N/A N/A N/A N/A ldflags libs False libs_dir True N/A c_header_dirs N/A N/A self N/A N/A N/A N/A ldflags libs False include_dir True N/A c_code_cleanup N/A N/A self node name inputs outputs sub N/A N/A N/A 
        // clean up views
        Py_XDECREF(xs); xs = 0;
        Py_XDECREF(ys); ys = 0;
        Py_XDECREF(zs); zs = 0;
         N/A c_code N/A N/A self node name inp out sub N/A N/A N/A N/A _x _y inp N/A N/A _z out N/A fail N/A sub N/A fail N/A N/A N/A N/A config blas ldflags N/A N/A N/A N/A N/A super BatchedDot self c_code node name inp out sub contiguous N/A N/A var ndim N/A N/A N/A strides N/A PyArray_STRIDES(%s) var N/A N/A N/A  &&  join N/A N/A N/A  &&  join N/A N/A N/A {strides}[{i}] > 0 && {strides}[{i}] % type_size == 0 format strides strides i i N/A i N/A range ndim N/A (%s) N/A N/A  ||  join N/A N/A N/A {strides}[{i}] == type_size format strides strides i i N/A i N/A range ndim N/A N/A N/A x_ndim y_ndim z_ndim N/A N/A N/A N/A node inputs N/A 0 ndim N/A N/A N/A node inputs N/A 1 ndim N/A N/A N/A node outputs N/A 0 ndim N/A z_dims N/A N/A PyArray_DIMS(%s)[0] _x N/A N/A x_ndim 3 N/A N/A N/A N/A z_dims append N/A PyArray_DIMS(%s)[1] _x N/A N/A y_ndim 3 N/A N/A N/A N/A z_dims append N/A PyArray_DIMS(%s)[2] _y N/A N/A N/A len z_dims z_ndim N/A z_shape_correct N/A N/A  &&  join N/A N/A PyArray_DIMS(%s)[%i] == %s N/A _z i dim N/A N/A i dim N/A enumerate z_dims N/A z_shape N/A N/A ,  join z_dims N/A z_contiguous N/A contiguous _z z_ndim N/A allocate N/A 
            if (NULL == %(_z)s || !(%(z_shape_correct)s)  || !(%(z_contiguous)s))
            {
                npy_intp dims[%(z_ndim)s] = {%(z_shape)s};
                Py_XDECREF(%(_z)s);
                %(_z)s = (PyArrayObject*)PyArray_SimpleNew(
                    %(z_ndim)s, dims, PyArray_TYPE(%(_x)s));
                if(!%(_z)s) {
                    PyErr_SetString(PyExc_MemoryError,
                                    "failed to alloc BatchedDot output");
                    %(fail)s
                }
            }
         N/A locals N/A contiguate N/A N/A N/A var ndim N/A N/A _x x_ndim N/A _y y_ndim N/A N/A _contiguous N/A contiguous var ndim N/A N/A N/A contiguate append N/A 
                if (!(%(_contiguous)s)) {
                    PyArrayObject * _copy = (PyArrayObject *) PyArray_Copy(%(var)s);
                    if (!_copy)
                        %(fail)s
                    Py_XDECREF(%(var)s);
                    %(var)s = _copy;
                }
             N/A locals N/A contiguate N/A N/A join contiguate c_dimshuffle N/A N/A newname oldname shape N/A N/A N/A _fail fail N/A _shape N/A N/A ,  join N/A N/A N/A axis None 1 N/A PyArray_DIMS(%s)[%i] N/A oldname axis N/A axis shape N/A N/A {
                npy_intp dims[3] = {%(_shape)s};
                PyArray_Dims newshape = {dims, 3};
                %(newname)s = (PyArrayObject*)PyArray_Newshape(%(oldname)s, &newshape, NPY_ANYORDER);
                if (!%(newname)s)
                    %(_fail)s
                // make sure we didn't accidentally copy
                assert(PyArray_DATA(%(oldname)s) == PyArray_DATA(%(newname)s));
            } N/A locals N/A N/A upcast N/A N/A N/A x_ndim 3 N/A N/A N/A N/A upcast append xs = %(_x)s; Py_XINCREF(xs); N/A N/A N/A x_ndim 2 N/A N/A N/A N/A upcast append N/A c_dimshuffle xs _x N/A 0 None 1 N/A N/A y_ndim 3 N/A N/A N/A N/A upcast append ys = %(_y)s; Py_XINCREF(ys); N/A N/A N/A y_ndim 2 N/A N/A N/A N/A upcast append N/A c_dimshuffle ys _y N/A 0 1 None N/A N/A z_ndim 3 N/A N/A N/A N/A upcast append zs = %(_z)s; Py_XINCREF(zs); N/A N/A N/A N/A upcast append N/A c_dimshuffle zs _z N/A 0 N/A N/A x_ndim 2 None 1 N/A N/A y_ndim 2 None 1 N/A upcast N/A N/A N/A join upcast N/A locals N/A N/A 
        int type_num = PyArray_DESCR(%(_x)s)->type_num;
        int type_size = PyArray_DESCR(%(_x)s)->elsize; // in bytes

        // xs, ys, zs will point to views onto %(_x)s, %(_y)s, %(_z)s
        PyArrayObject *xs = 0, *ys = 0, *zs = 0;

        if (PyArray_NDIM(%(_x)s) != %(x_ndim)s) {
            PyErr_Format(PyExc_NotImplementedError,
                         "rank(x) != %(x_ndim)s. rank(x) is %%d.",
                         PyArray_NDIM(%(_x)s));
            %(fail)s;
        }
        if (PyArray_NDIM(%(_y)s) != %(y_ndim)s) {
            PyErr_Format(PyExc_NotImplementedError,
                         "rank(y) != %(y_ndim)s. rank(y) is %%d.",
                         PyArray_NDIM(%(_y)s));
            %(fail)s;
        }
        if (%(_z)s && PyArray_NDIM(%(_z)s) != %(z_ndim)s) {
            PyErr_Format(PyExc_NotImplementedError,
                         "rank(z) != %(z_ndim)s. rank(z) is %%d.",
                         PyArray_NDIM(%(_z)s));
            %(fail)s;
        }

        // allocate output
        %(allocate)s
        // reallocate any noncontiguous arrays or arrays with invalid strides
        %(contiguate)s
        // add dims to make sure everything is tensor3
        %(upcast)s
        // from here on, use xs, ys and zs as they are tensor3 and share memory
        // with the original %(_x)s, %(_y)s and %(_z)s arrays.

        if ((PyArray_DESCR(xs)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(xs)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(x) is not double or float"); %(fail)s;}

        if ((PyArray_DESCR(ys)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(ys)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(y) is not double or float"); %(fail)s;}

        if ((PyArray_DESCR(zs)->type_num != NPY_DOUBLE)
            && (PyArray_DESCR(zs)->type_num != NPY_FLOAT))
        {PyErr_SetString(PyExc_NotImplementedError, "type(z) is not double or float"); %(fail)s;}

        if ((PyArray_DESCR(xs)->type_num != PyArray_DESCR(ys)->type_num)
            ||(PyArray_DESCR(xs)->type_num != PyArray_DESCR(zs)->type_num))
        { PyErr_SetString(PyExc_NotImplementedError, "type(x), type(y), type(z) are not all the same"); %(fail)s; }

        switch (type_num)
        {
            case NPY_FLOAT:
            if (batch_gemm<float>(sgemm_, type_size, xs, ys, zs)) {
                %(fail)s;
            }
            break;
            case NPY_DOUBLE:
            if (batch_gemm<double>(dgemm_, type_size, xs, ys, zs)) {
                %(fail)s;
            }
            break;
        }
         N/A locals N/A c_code_cache_version N/A N/A self N/A N/A theano.tensor.blas_headers blas_header_version N/A N/A 1 N/A blas_header_version N/A grad N/A N/A self inp grads N/A N/A N/A N/A x y inp N/A N/A gz grads N/A N/A xdim ydim gdim N/A N/A N/A x type ndim N/A N/A y type ndim N/A N/A gz type ndim N/A N/A gdim 1 N/A N/A xgrad N/A N/A N/A gz dimshuffle 0 x y N/A ygrad N/A N/A N/A gz dimshuffle 0 x x N/A N/A N/A N/A xdim 2 N/A ydim 3 N/A N/A xgrad N/A N/A T batched_dot gz N/A N/A y dimshuffle 0 2 1 N/A ygrad N/A N/A N/A x dimshuffle 0 1 x N/A N/A gz dimshuffle 0 x 1 N/A N/A N/A N/A xdim 3 N/A ydim 2 N/A N/A xgrad N/A N/A N/A gz dimshuffle 0 1 x N/A N/A y dimshuffle 0 x 1 N/A ygrad N/A N/A T batched_dot N/A N/A x dimshuffle 0 2 1 gz N/A N/A N/A xdim ydim 3 N/A N/A xgrad N/A N/A T batched_dot gz N/A N/A y dimshuffle 0 2 1 N/A ygrad N/A N/A T batched_dot N/A N/A x dimshuffle 0 2 1 gz N/A N/A N/A xgrad broadcastable N/A x broadcastable N/A N/A xgrad N/A N/A T patternbroadcast xgrad N/A x broadcastable N/A N/A N/A ygrad broadcastable N/A y broadcastable N/A N/A ygrad N/A N/A T patternbroadcast ygrad N/A y broadcastable N/A N/A xgrad ygrad N/A R_op N/A N/A self inputs eval_points N/A N/A N/A N/A N/A len inputs 2 N/A N/A N/A len eval_points 2 N/A N/A N/A N/A eval_points N/A 0 None N/A N/A eval_points N/A 1 None N/A N/A N/A None N/A debugger_available N/A N/A config compute_test_value off N/A debugger_available N/A N/A N/A N/A iv0 N/A N/A N/A N/A theano gof op get_test_value N/A inputs N/A 0 N/A N/A N/A AttributeError N/A N/A N/A N/A N/A N/A theano gof op missing_test_message first input passed to BatchedDot.R_op has no test value N/A debugger_available False N/A N/A N/A iv1 N/A N/A N/A N/A theano gof op get_test_value N/A inputs N/A 1 N/A N/A N/A AttributeError N/A N/A N/A N/A N/A N/A theano gof op missing_test_message second input passed to BatchedDot.R_op has no test value N/A debugger_available False N/A N/A eval_points N/A 0 N/A N/A N/A N/A ev0 N/A N/A N/A N/A theano gof op get_test_value N/A eval_points N/A 0 N/A N/A N/A AttributeError N/A N/A N/A N/A N/A N/A theano gof op missing_test_message first eval point passed to BatchedDot.R_op has no test value N/A debugger_available False N/A N/A eval_points N/A 1 N/A N/A N/A N/A ev1 N/A N/A N/A N/A theano gof op get_test_value N/A eval_points N/A 1 N/A N/A N/A AttributeError N/A N/A N/A N/A N/A N/A theano gof op missing_test_message second eval point passed to BatchedDot.R_op has no test value N/A debugger_available False N/A debugger_available N/A N/A input_values N/A iv0 iv1 N/A eval_point_values N/A ev0 ev1 N/A i N/A xrange 2 N/A N/A N/A N/A N/A eval_point_values N/A i None N/A N/A N/A input_values N/A i shape N/A N/A eval_point_values N/A i shape N/A N/A N/A ValueError N/A N/A N/A N/A input  N/A str i  and eval_point  N/A str i N/A  to BatchedDot.R_op should have the same shape, but their shapes are %s and %s, respectively N/A N/A str N/A N/A input_values N/A i shape N/A str N/A N/A eval_point_values N/A i shape N/A N/A eval_points N/A 0 N/A N/A t1 N/A self N/A eval_points N/A 0 N/A inputs N/A 1 N/A N/A eval_points N/A 1 N/A N/A t2 N/A self N/A inputs N/A 0 N/A eval_points N/A 1 N/A N/A N/A eval_points N/A 0 N/A eval_points N/A 1 N/A N/A N/A N/A t1 t2 N/A N/A N/A eval_points N/A 0 N/A N/A N/A t1 N/A N/A N/A t2 N/A infer_shape N/A N/A self node shapes N/A N/A N/A shape_ shapes N/A N/A N/A N/A len shape_ N/A 2 3 N/A N/A N/A NotImplementedError N/A N/A xshp yshp shapes N/A N/A N/A N/A xshp N/A -1 N/A yshp N/A 2 N/A N/A N/A batched_dot N/A BatchedDot local_print_as_we_go_along N/A N/A node N/A N/A N/A N/A N/A node op N/A N/A T sub N/A T add N/A N/A N/A debugprint node N/A N/A local_optimizer N/A N/A T sub N/A T add