Module Expr Str ImportFrom alias alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias TryExcept body ImportFrom alias Import alias identifier Import alias identifier ImportFrom alias alias handlers ExceptHandler type NameLoad body ImportFrom alias Import alias Import alias Import alias Import alias ImportFrom alias alias TryExcept body Expr NameLoad handlers ExceptHandler type NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body With Call NameLoad NameLoad NameStore body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Str Exec NameLoad NameLoad NameLoad decorator_list TryExcept body Expr NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Import alias Import alias Import alias identifier TryExcept body Import alias Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Pass ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call AttributeLoad NameLoad attr Str body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str Str handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad Str body Pass orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr keyword NameLoad attr orelse Raise Call NameLoad Str orelse With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad Num body Raise Call NameLoad Str Assign NameStore Num For NameStore Call NameLoad NameLoad Call NameLoad NameLoad body If CompareEq SubscriptLoad NameLoad Index NameLoad NameLoad body AugAssignAdd NameStore Num orelse If CompareEq SubscriptLoad NameLoad Index NameLoad NameLoad body AugAssignSub NameStore Num If CompareEq NameLoad Num body Break Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str While CompareGtE NameLoad Num body Assign NameStore SubscriptLoad NameLoad Slice NameLoad NameLoad If CompareEq SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Str body Assign NameStore Call AttributeLoad NameLoad attr Str BinOpAdd NameLoad Num If CompareLt NameLoad Num body Raise Call NameLoad Str Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num NameLoad attr Str For NameStore Call NameLoad Call NameLoad NameLoad body TryExcept body Assign SubscriptStore NameLoad Index NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad handlers ExceptHandler type NameLoad body Pass orelse If CompareEq SubscriptLoad NameLoad Index BinOpAdd NameLoad Num Str body Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice NameLoad Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Call NameLoad NameLoad orelse Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareGt Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If CompareLt NameLoad Num body Break AugAssignAdd NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad decorator_list If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad Num body Raise Call NameLoad Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Slice NameLoad Str Str Assign NameStore Call NameLoad NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareLt NameLoad Num body Raise Call NameLoad Str Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd BinOpAdd NameLoad Call NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Slice Call AttributeLoad NameLoad attr Str Assign NameStore ListComp Call AttributeLoad NameLoad attr Str comprehension NameStore Call AttributeLoad NameLoad attr Str Return TupleLoad NameLoad NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults Str NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict If Call AttributeLoad NameLoad attr Str body If NameLoad body Raise Call NameLoad Str Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If BoolOpAnd CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str UnaryOpNot Call AttributeLoad NameLoad attr Str body If UnaryOpNot NameLoad body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad orelse Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Str Str SubscriptLoad NameLoad Index Str If CompareIn NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Num orelse If CompareIn SubscriptLoad NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index Str body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index SubscriptLoad NameLoad Index Str If CompareIn SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Str Index Num If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpAdd SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index NameLoad Str If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign NameStore Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Assign NameStore ListLoad BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Str Str SubscriptLoad NameLoad Index Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str SubscriptLoad NameLoad Index Str Assign NameStore NameLoad If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Str For NameStore NameLoad body If Call NameLoad NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareIn NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Assign NameStore NameLoad orelse Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpAdd BinOpAdd SubscriptLoad NameLoad Index Str Str SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad body Return NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore SubscriptLoad NameLoad Slice Num Return NameLoad decorator_list decorator_list Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Dict Str Str Str Str Str TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num TupleLoad Num Num FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Num If Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Num Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Lambda arguments args defaults Call NameLoad NameLoad For TupleStore NameStore NameStore NameStore TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareIn NameLoad TupleLoad Str Str Str Str Str body Continue orelse If CompareEq NameLoad Str body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Str attr Str If NameLoad body If NameLoad body If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad NameLoad attr Str Str SubscriptLoad NameLoad Index Num Assign NameStore IfExp CompareGt Call NameLoad NameLoad Num BinOpAdd SubscriptLoad NameLoad Slice Num Str NameLoad orelse Raise Call NameLoad Str Str Str orelse Assign NameStore SubscriptLoad NameLoad Index Num Break Return TupleLoad NameLoad NameLoad BinOpAdd BinOpAdd NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Str TryExcept body Assign NameStore Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr handlers ExceptHandler type NameLoad body Assign NameStore Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Expr Call NameLoad Str NameLoad NameLoad NameLoad NameLoad NameLoad For NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Assign NameStore Num If BoolOpAnd NameLoad Call AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr Num Assign NameStore Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Lambda arguments args defaults Call NameLoad NameLoad Assign NameStore NameLoad Assign NameStore Num For TupleStore NameStore NameStore NameStore TupleStore NameStore NameStore NameStore NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad If CompareIn NameLoad TupleLoad Str Str Str Str Str body Continue orelse If BoolOpAnd CompareEq NameLoad Str NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad Return TupleLoad BinOpAdd BinOpAdd NameLoad Num NameLoad BinOpAdd BinOpAdd NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListComp NameLoad comprehension NameStore NameLoad Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword TupleLoad Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Num BinOpSub NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index Num NameLoad Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr AttributeLoad NameLoad attr If UnaryOpNot Call NameLoad NameLoad body Return ListLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad ExtSlice Slice Index Num attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str BinOpAdd SubscriptLoad NameLoad Slice Num Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Slice Num If CompareNotEq NameLoad Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Slice Num orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot CompareEq NameLoad Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str body Raise Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str attr If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Str For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Slice Num For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Assign NameStore CompareIn NameLoad NameLoad With Call NameLoad NameLoad IfExp NameLoad Str Str NameStore body If UnaryOpNot NameLoad body Expr Call NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str NameLoad keyword NameLoad Expr Call NameLoad BinOpMod Str BinOpMult Str Call NameLoad NameLoad keyword NameLoad Expr Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list Assign NameStore ListLoad Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad Assign NameStore BinOpDiv NameLoad Call NameLoad NameLoad If CompareLtE BinOpMult NameLoad NameLoad NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore Call NameLoad Call NameLoad BinOpMult NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad BinOpMult NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str TupleLoad NameLoad NameLoad TupleLoad Num Num Num Assign NameStore TupleLoad BinOpFloorDiv BinOpSub NameLoad NameLoad Num BinOpFloorDiv BinOpSub NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr ListLoad Str Str Str Str NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore NameLoad For NameStore Call NameLoad BinOpSub Call NameLoad NameLoad Num Num Num body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Slice NameLoad TryExcept body Exec BinOpMod Str TupleLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Call AttributeLoad Str attr SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num Break Return NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body For NameStore AttributeLoad NameLoad attr body Assign NameStore BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad BinOpAdd NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad While Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad Str attr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body For NameStore AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Num Index Num Assign NameStore SubscriptLoad NameLoad Slice Call NameLoad NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpAdd SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad Expr Yield TupleLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Dict Str Str Str NameLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign NameStore BinOpMod Str NameLoad Assign NameStore NameLoad Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num If BoolOpOr CompareEq NameLoad Str CompareEq NameLoad Str body Assign NameStore Str orelse AugAssignAdd NameStore Str Assign NameStore BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd SubscriptLoad NameLoad Slice Num Str Assign NameStore Num Assign NameStore Num Assign NameStore Num If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpMod NameLoad Num If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr orelse Assign NameStore Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad NameLoad attr If BoolOpOr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad CompareLtE AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr body Expr Call NameLoad BinOpMod Str NameLoad Assign NameStore Call NameLoad Import alias identifier Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr TryFinally body TryExcept body Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Dict Str NameLoad Expr Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareIn Str NameLoad body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore BinOpMod Str Call AttributeLoad Str attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad Call NameLoad NameLoad Str attr NameLoad Expr Call AttributeLoad Call NameLoad NameLoad Str attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad AttributeLoad NameLoad attr handlers ExceptHandler body Expr Call NameLoad BinOpMult Num Str Expr Call NameLoad BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Expr Call NameLoad BinOpMult Num Str finalbody Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call NameLoad BinOpMod Str NameLoad orelse Assign NameStore ListComp SubscriptLoad NameLoad Slice Call NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd SubscriptLoad NameLoad Slice Num Str Assign NameStore BinOpMod NameLoad Num If CompareIn NameLoad NameLoad body Expr Call NameLoad BinOpMod NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Num Expr Call NameLoad NameLoad NameLoad Num Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad Str NameLoad Num Num Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad If CompareEq Call NameLoad NameLoad Num body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore BinOpMod NameLoad Call AttributeLoad NameLoad attr Str orelse Assign NameStore NameLoad For NameStore NameLoad body AugAssignAdd NameStore BinOpMod NameLoad Call AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad Num Assign NameStore Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd SubscriptLoad NameLoad Slice Num Str Str Expr Call AttributeLoad NameLoad attr BinOpMod NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad Call NameLoad NameLoad attr If NameLoad body Assign NameStore BinOpAdd SubscriptLoad NameLoad Slice Num Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp Call AttributeLoad Str attr NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body If CompareIsNot NameLoad NameLoad body Return Expr Call NameLoad Str Assign NameStore Dict Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad Str Assign SubscriptStore NameLoad Index Str Call NameLoad Str Assign SubscriptStore NameLoad Index Str Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore NameLoad body Expr Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice BinOpAdd Call NameLoad NameLoad Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad BinOpAdd SubscriptLoad NameLoad Slice Num Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Dict For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Index Num If CompareNotIn NameLoad NameLoad body Continue Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr GeneratorExp BinOpMod NameLoad NameLoad comprehension NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad BinOpMod NameLoad TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad FunctionDef arguments args NameParam defaults body Return SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr decorator_list If CompareGt Call NameLoad NameLoad Num body With Call NameLoad NameLoad Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr With Call NameLoad NameLoad Str NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad Str Expr Call NameLoad AttributeLoad NameLoad attr ExceptHandler type NameLoad name NameStore body Expr Call NameLoad Str Expr Call NameLoad AttributeLoad NameLoad attr Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Str If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Pass decorator_list
N/A N/A 
Example generation for the scikit learn

Generate the rst files for the examples by iterating over the python
example files.

Files that generate images should start with 'plot'

 __future__ division print_function time time N/A ast N/A os N/A re N/A shutil N/A traceback N/A glob N/A sys N/A gzip N/A posixpath N/A subprocess textwrap dedent N/A N/A StringIO StringIO N/A cPickle pickle N/A urllib2 urllib urllib2 HTTPError URLError N/A N/A N/A ImportError N/A io StringIO N/A pickle N/A urllib.request N/A urllib.error N/A urllib.parse urllib.error HTTPError URLError N/A N/A N/A execfile N/A N/A N/A NameError N/A execfile N/A N/A filename global_vars local_vars N/A None None N/A N/A N/A open filename f N/A N/A code N/A compile N/A N/A f read filename exec N/A code global_vars local_vars N/A N/A N/A N/A basestring N/A N/A N/A NameError N/A N/A basestring str N/A token N/A tokenize N/A numpy np N/A N/A N/A matplotlib N/A N/A N/A matplotlib use Agg N/A N/A N/A ImportError N/A N/A sklearn.externals joblib Tee N/A object N/A __init__ N/A N/A self file1 file2 N/A N/A N/A N/A self file1 file1 N/A N/A self file2 file2 N/A write N/A N/A self data N/A N/A N/A N/A N/A N/A self file1 write data N/A N/A N/A N/A self file2 write data N/A flush N/A N/A self N/A N/A N/A N/A N/A N/A self file1 flush N/A N/A N/A N/A self file2 flush N/A N/A _get_data N/A N/A url N/A N/A N/A Helper function to get data over http or from a local file N/A N/A N/A url startswith http:// N/A N/A N/A N/A resp N/A N/A urllib urlopen url N/A encoding N/A N/A N/A N/A resp headers dict get content-encoding plain N/A N/A N/A AttributeError N/A N/A resp N/A N/A N/A urllib request urlopen url N/A encoding N/A N/A N/A resp headers get content-encoding plain N/A data N/A N/A resp read N/A N/A encoding plain N/A N/A N/A N/A N/A encoding gzip N/A N/A data N/A StringIO data N/A data N/A N/A N/A N/A gzip GzipFile fileobj data read N/A N/A N/A RuntimeError unknown encoding N/A N/A N/A open url r fid N/A N/A data N/A N/A fid read N/A N/A N/A fid close N/A data N/A N/A mem N/A N/A joblib Memory cachedir _build N/A get_data N/A N/A mem cache _get_data parse_sphinx_searchindex N/A N/A searchindex N/A N/A N/A Parse a Sphinx search index

    Parameters
    ----------
    searchindex : str
        The Sphinx search index (contents of searchindex.js)

    Returns
    -------
    filenames : list of str
        The file names parsed from the search index.
    objects : dict
        The objects parsed from the search index.
     _select_block N/A N/A str_in start_tag end_tag N/A N/A N/A Select first block delimited by start_tag and end_tag N/A start_pos N/A N/A str_in find start_tag N/A N/A start_pos 0 N/A N/A N/A ValueError start_tag not found N/A depth 0 N/A pos N/A range start_pos N/A len str_in N/A N/A N/A N/A str_in N/A pos start_tag N/A N/A depth 1 N/A N/A N/A N/A str_in N/A pos end_tag N/A N/A depth 1 N/A N/A depth 0 N/A N/A N/A sel N/A str_in N/A N/A start_pos 1 pos N/A sel N/A _parse_dict_recursive N/A N/A dict_str N/A N/A N/A Parse a dictionary from the search index N/A dict_out N/A dict N/A pos_last 0 N/A pos N/A N/A dict_str find : N/A N/A pos 0 N/A N/A key N/A dict_str N/A pos_last pos N/A N/A N/A dict_str N/A N/A pos 1 [ N/A N/A pos_tmp N/A N/A dict_str find ] N/A pos 1 N/A N/A pos_tmp 0 N/A N/A N/A RuntimeError error when parsing dict N/A value N/A N/A N/A dict_str N/A N/A pos 2 pos_tmp split , N/A i N/A range N/A len value N/A N/A N/A N/A N/A value N/A i N/A int N/A value N/A i N/A N/A N/A ValueError N/A N/A N/A N/A N/A N/A dict_str N/A N/A pos 1 { N/A N/A subdict_str N/A _select_block N/A dict_str N/A pos { } N/A value N/A _parse_dict_recursive subdict_str N/A pos_tmp N/A pos N/A len subdict_str N/A N/A N/A ValueError error when parsing dict: unknown elem N/A key N/A N/A key strip " N/A N/A N/A len key 0 N/A N/A N/A dict_out N/A key value N/A pos_last N/A N/A dict_str find , pos_tmp N/A N/A pos_last 0 N/A N/A N/A pos_last 1 N/A pos N/A N/A dict_str find : pos_last N/A dict_out N/A N/A N/A hasattr searchindex decode N/A N/A searchindex N/A N/A searchindex decode UTF-8 N/A query objects: N/A pos N/A N/A searchindex find query N/A N/A pos 0 N/A N/A N/A ValueError "objects:" not found in search index N/A sel N/A _select_block N/A searchindex N/A pos { } N/A objects N/A _parse_dict_recursive sel N/A query filenames: N/A pos N/A N/A searchindex find query N/A N/A pos 0 N/A N/A N/A ValueError "filenames:" not found in search index N/A filenames N/A searchindex N/A N/A N/A pos N/A len query 1 N/A filenames N/A filenames N/A N/A N/A filenames find ] N/A filenames N/A N/A N/A f strip " N/A f N/A N/A filenames split , N/A N/A filenames objects N/A SphinxDocLinkResolver N/A object N/A N/A  Resolve documentation links using searchindex.js generated by Sphinx

    Parameters
    ----------
    doc_url : str
        The base URL of the project website.
    searchindex : str
        Filename of searchindex, relative to doc_url.
    extra_modules_test : list of str
        List of extra module names to test.
    relative : bool
        Return relative links (only useful for links to documentation of this
        package).
     __init__ N/A N/A self doc_url searchindex extra_modules_test relative N/A searchindex.js None False N/A N/A N/A self doc_url doc_url N/A N/A self relative relative N/A N/A self _link_cache N/A N/A N/A self extra_modules_test extra_modules_test N/A N/A self _page_cache N/A N/A N/A N/A doc_url startswith http:// N/A N/A relative N/A N/A N/A ValueError Relative links are only supported for local URLs (doc_url cannot start with "http://)" N/A searchindex_url N/A N/A doc_url / searchindex N/A N/A searchindex_url N/A N/A N/A os path join doc_url searchindex N/A N/A N/A N/A N/A N/A os name lower nt N/A N/A N/A doc_url startswith http:// N/A N/A N/A relative N/A N/A N/A ValueError You have to use relative=True for the local package on a Windows system. N/A N/A self _is_windows True N/A N/A N/A self _is_windows False N/A sindex N/A get_data searchindex_url N/A N/A filenames objects N/A parse_sphinx_searchindex sindex N/A N/A self _searchindex N/A dict filenames filenames objects objects N/A _get_link N/A N/A self cobj N/A N/A N/A Get a valid link, False if not found N/A fname_idx None N/A full_name N/A N/A N/A cobj N/A module_short . N/A cobj N/A name N/A N/A full_name N/A N/A self _searchindex N/A objects N/A N/A value N/A N/A N/A self _searchindex N/A objects N/A full_name N/A N/A isinstance value dict N/A N/A value N/A value N/A N/A next N/A iter N/A N/A value keys N/A fname_idx N/A value N/A 0 N/A N/A N/A N/A cobj N/A module_short N/A N/A self _searchindex N/A objects N/A N/A value N/A N/A N/A self _searchindex N/A objects N/A N/A cobj N/A module_short N/A N/A N/A cobj N/A name N/A N/A value keys N/A N/A fname_idx N/A N/A value N/A N/A cobj N/A name N/A 0 N/A N/A fname_idx None N/A N/A fname N/A N/A N/A N/A self _searchindex N/A filenames N/A fname_idx .html N/A N/A self _is_windows N/A N/A fname N/A N/A fname replace / \ N/A link N/A N/A N/A os path join N/A self doc_url fname N/A N/A link N/A N/A posixpath join N/A self doc_url fname N/A N/A hasattr link decode N/A N/A link N/A N/A link decode utf-8 replace N/A N/A link N/A self _page_cache N/A N/A html N/A N/A self _page_cache N/A link N/A N/A html N/A get_data link N/A N/A N/A self _page_cache N/A link html N/A comb_names N/A N/A N/A N/A cobj N/A module_short . N/A cobj N/A name N/A N/A N/A self extra_modules_test None N/A N/A mod N/A self extra_modules_test N/A N/A N/A N/A comb_names append N/A N/A mod . N/A cobj N/A name N/A url False N/A N/A hasattr html decode N/A N/A html N/A N/A html decode utf-8 replace N/A comb_name comb_names N/A N/A N/A hasattr comb_name decode N/A N/A comb_name N/A N/A comb_name decode utf-8 replace N/A N/A comb_name html N/A N/A url N/A N/A link # comb_name N/A link url N/A N/A link False N/A link N/A resolve N/A N/A self cobj this_url N/A N/A N/A Resolve the link to the documentation, returns None if not found

        Parameters
        ----------
        cobj : dict
            Dict with information about the "code object" for which we are
            resolving a link.
            cobi['name'] : function or class name (str)
            cobj['module_short'] : shortened module name (str)
            cobj['module'] : module name (str)
        this_url: str
            URL of the current page. Needed to construct relative URLs
            (only used if relative=True in constructor).

        Returns
        -------
        link : str | None
            The link (URL) to the documentation.
         N/A full_name N/A N/A N/A cobj N/A module_short . N/A cobj N/A name N/A link N/A N/A N/A self _link_cache get full_name None N/A N/A link None N/A N/A link N/A N/A self _get_link cobj N/A N/A N/A self _link_cache N/A full_name link N/A N/A N/A link False N/A link None N/A N/A None N/A N/A self relative N/A N/A link N/A N/A N/A os path relpath link start this_url N/A N/A self _is_windows N/A N/A link N/A N/A link replace \ / N/A link N/A link N/A 3 N/A link N/A N/A N/A rst_template 

.. _example_%(short_fname)s:

%(docstring)s

**Python source code:** :download:`%(fname)s <%(fname)s>`

.. literalinclude:: %(fname)s
    :lines: %(end_row)s-
     N/A plot_rst_template 

.. _example_%(short_fname)s:

%(docstring)s

%(image_list)s

%(stdout)s

**Python source code:** :download:`%(fname)s <%(fname)s>`

.. literalinclude:: %(fname)s
    :lines: %(end_row)s-

**Total running time of the example:** %(time_elapsed) .2f seconds
(%(time_m) .0f minutes %(time_s) .2f seconds)
     N/A HLIST_HEADER 
.. rst-class:: horizontal

 N/A HLIST_IMAGE_TEMPLATE 
    *

      .. image:: images/%s
            :scale: 47
 N/A SINGLE_IMAGE 
.. image:: images/%s
    :align: center
 N/A carousel_thumbs N/A plot_single_localization_001.png plot_multiple_localization_001.png plot_overfeat_layer1_filters_001.png plot_mnist_generator_001.png plot_asirra_dataset_001.png N/A 1 250 N/A 1 250 N/A 1 250 N/A 1 250 N/A 1 250 extract_docstring N/A N/A filename ignore_heading N/A False N/A N/A  Extract a module-level docstring, if any
     N/A lines N/A N/A N/A open filename readlines N/A start_row 0 N/A N/A N/A N/A lines N/A 0 startswith #! N/A N/A N/A N/A lines pop 0 N/A start_row 1 N/A docstring N/A first_par N/A line_iterator N/A iter lines N/A tokens N/A N/A tokenize generate_tokens N/A N/A N/A N/A N/A next line_iterator N/A N/A tok_type tok_content _ N/A erow _ _ tokens N/A N/A tok_type N/A N/A token tok_name N/A tok_type N/A N/A tok_type N/A NEWLINE COMMENT NL INDENT DEDENT N/A N/A N/A N/A N/A tok_type STRING N/A N/A docstring N/A eval tok_content N/A paragraphs N/A N/A N/A N/A join N/A N/A N/A line rstrip N/A line N/A N/A docstring split split N/A paragraphs N/A N/A ignore_heading N/A N/A N/A N/A len paragraphs 1 N/A N/A first_par N/A N/A re sub N/A paragraphs N/A 1 N/A first_par N/A N/A N/A len first_par 95 N/A N/A first_par N/A 95 ... first_par N/A N/A N/A ValueError Docstring not found by gallery Please check your example's layout  and make sure it's correct N/A N/A first_par N/A paragraphs N/A 0 N/A N/A N/A docstring first_par N/A N/A erow 1 start_row N/A generate_example_rst N/A N/A app N/A N/A N/A  Generate the list of examples, as well as the contents of
        examples.
     N/A root_dir N/A N/A N/A os path join N/A N/A app builder srcdir auto_examples N/A example_dir N/A N/A N/A os path abspath N/A N/A N/A os path join N/A N/A app builder srcdir .. examples N/A generated_dir N/A N/A N/A os path abspath N/A N/A N/A os path join N/A N/A app builder srcdir modules generated N/A N/A N/A plot_gallery N/A eval N/A N/A N/A app builder config plot_gallery N/A N/A N/A TypeError N/A N/A plot_gallery N/A bool N/A N/A N/A app builder config plot_gallery N/A N/A N/A N/A N/A os path exists example_dir N/A N/A N/A N/A os makedirs example_dir N/A N/A N/A N/A N/A os path exists root_dir N/A N/A N/A N/A os makedirs root_dir N/A N/A N/A N/A N/A os path exists generated_dir N/A N/A N/A N/A os makedirs generated_dir N/A fhindex N/A open N/A N/A N/A os path join root_dir index.rst w N/A N/A N/A fhindex write 


.. raw:: html


    <style type="text/css">
    div#sidebarbutton {
        /* hide the sidebar collapser, while ensuring vertical arrangement */
        width: 0px;
        overflow: hidden;
    }
    </style>


Examples
========

.. _examples-index:
 N/A seen_backrefs N/A set N/A N/A generate_dir_rst . fhindex example_dir root_dir plot_gallery seen_backrefs N/A dir N/A sorted N/A N/A os listdir example_dir N/A N/A N/A N/A N/A os path isdir N/A N/A N/A os path join example_dir dir N/A N/A N/A generate_dir_rst dir fhindex example_dir root_dir plot_gallery seen_backrefs N/A N/A N/A fhindex flush N/A extract_line_count N/A N/A filename target_dir N/A N/A N/A example_file N/A N/A N/A os path join target_dir filename N/A lines N/A N/A N/A open example_file readlines N/A start_row 0 N/A N/A lines N/A N/A N/A lines N/A 0 startswith #! N/A N/A N/A N/A lines pop 0 N/A start_row 1 N/A line_iterator N/A iter lines N/A tokens N/A N/A tokenize generate_tokens N/A N/A N/A N/A N/A next line_iterator N/A check_docstring True N/A erow_docstring 0 N/A N/A tok_type _ _ N/A erow _ _ tokens N/A N/A tok_type N/A N/A token tok_name N/A tok_type N/A N/A tok_type N/A NEWLINE COMMENT NL INDENT DEDENT N/A N/A N/A N/A N/A N/A tok_type STRING check_docstring N/A N/A erow_docstring erow N/A check_docstring False N/A N/A N/A N/A erow_docstring 1 start_row N/A N/A erow 1 start_row N/A line_count_sort N/A N/A file_list target_dir N/A N/A N/A new_list N/A x N/A x file_list N/A N/A x endswith .py N/A unsorted N/A N/A np zeros shape N/A N/A len new_list 2 N/A unsorted N/A N/A unsorted astype N/A np object N/A N/A count exmpl N/A enumerate new_list N/A N/A N/A docstr_lines total_lines N/A extract_line_count exmpl target_dir N/A N/A N/A unsorted N/A count N/A 1 N/A total_lines docstr_lines N/A N/A N/A unsorted N/A count N/A 0 exmpl N/A index N/A N/A np lexsort N/A N/A N/A N/A unsorted N/A N/A N/A 0 astype N/A np str N/A N/A N/A unsorted N/A N/A N/A 1 astype N/A np float N/A N/A N/A len unsorted N/A N/A N/A N/A N/A N/A N/A N/A np array N/A N/A unsorted N/A index N/A N/A N/A 0 tolist N/A _thumbnail_div N/A N/A subdir full_dir fname snippet N/A N/A N/A Generates RST to place a thumbnail in a gallery N/A thumb N/A N/A N/A os path join full_dir images thumb N/A N/A fname N/A -3 .png N/A link_name N/A N/A N/A N/A N/A os path join full_dir fname replace N/A N/A os path sep _ N/A ref_name N/A N/A N/A N/A N/A os path join subdir fname replace N/A N/A os path sep _ N/A N/A N/A ref_name startswith ._ N/A N/A ref_name N/A ref_name N/A 2 N/A out N/A N/A N/A N/A out append 

.. raw:: html


    <div class="thumbnailContainer">
        <div class="docstringWrapper">


 N/A N/A N/A out append N/A .. figure:: %s
 thumb N/A N/A N/A link_name startswith ._ N/A N/A link_name N/A link_name N/A 2 N/A N/A full_dir . N/A N/A N/A N/A out append N/A    :target: ./%s/%s.html

 N/A full_dir N/A fname N/A -3 N/A N/A N/A N/A out append N/A    :target: ./%s.html

 N/A link_name N/A -3 N/A N/A N/A out append N/A    :ref:`example_%s`


.. raw:: html


    <p>%s
    </p></div>
    </div>

 N/A ref_name snippet N/A N/A N/A join out N/A generate_dir_rst N/A N/A dir fhindex example_dir root_dir plot_gallery seen_backrefs N/A N/A N/A  Generate the rst file for an example directory.
     N/A N/A N/A dir . N/A N/A target_dir N/A N/A N/A os path join root_dir dir N/A src_dir N/A N/A N/A os path join example_dir dir N/A N/A target_dir root_dir N/A src_dir example_dir N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join src_dir README.txt N/A N/A N/A ValueError N/A Example directory %s does not have a README.txt src_dir N/A N/A N/A fhindex write N/A 


%s


 N/A N/A N/A open N/A N/A N/A os path join src_dir README.txt read N/A N/A N/A N/A N/A os path exists target_dir N/A N/A N/A N/A os makedirs target_dir N/A sorted_listdir N/A line_count_sort N/A N/A os listdir src_dir src_dir N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join dir images thumb N/A N/A N/A N/A os makedirs N/A N/A N/A os path join dir images thumb N/A fname sorted_listdir N/A N/A N/A N/A fname endswith py N/A N/A backrefs N/A generate_file_rst fname target_dir src_dir root_dir plot_gallery N/A new_fname N/A N/A N/A os path join src_dir fname N/A N/A _ snippet _ N/A extract_docstring new_fname True N/A N/A N/A fhindex write N/A _thumbnail_div dir dir fname snippet N/A N/A N/A fhindex write N/A 

.. toctree::
   :hidden:

   %s/%s

 N/A dir N/A fname N/A -3 N/A backref backrefs N/A N/A include_path N/A N/A N/A os path join root_dir N/A ../modules/generated/%s.examples backref N/A seen N/A backref seen_backrefs N/A N/A open include_path N/A seen a w ex_file N/A N/A N/A seen N/A N/A N/A print file ex_file N/A N/A print N/A Examples using ``%s`` backref file ex_file N/A N/A print N/A -----------------%s-- N/A - N/A len backref file ex_file N/A N/A print file ex_file N/A rel_dir N/A N/A N/A os path join ../../auto_examples dir N/A N/A N/A ex_file write N/A _thumbnail_div dir rel_dir fname snippet N/A N/A N/A seen_backrefs add backref N/A N/A N/A fhindex write 
.. raw:: html

    <div class="clearer"></div>
     N/A N/A DOCMODULES N/A sklearn matplotlib numpy scipy make_thumbnail N/A N/A in_fname out_fname width height N/A N/A N/A Make a thumbnail with the same aspect ratio centered in an
       image with a given width and height
     N/A N/A PIL Image N/A N/A N/A ImportError N/A N/A Image N/A img N/A N/A Image open in_fname N/A N/A width_in height_in N/A img size N/A scale_w N/A width N/A float width_in N/A scale_h N/A height N/A float height_in N/A N/A N/A height_in scale_w height N/A N/A scale scale_w N/A N/A scale scale_h N/A width_sc N/A int N/A round N/A scale width_in N/A height_sc N/A int N/A round N/A scale height_in N/A N/A N/A img thumbnail N/A width_sc height_sc N/A Image ANTIALIAS N/A thumb N/A N/A Image new RGB N/A width height N/A 255 255 255 N/A pos_insert N/A N/A N/A width width_sc 2 N/A N/A height height_sc 2 N/A N/A N/A thumb paste img pos_insert N/A N/A N/A thumb save out_fname N/A N/A N/A N/A os environ get SKLEARN_DOC_OPTIPNG False N/A N/A N/A N/A N/A N/A subprocess call N/A optipng -quiet -o 9 out_fname N/A N/A N/A Exception N/A N/A N/A N/A warnings warn Install optipng to reduce the size of the generated images N/A get_short_module_name N/A N/A module_name obj_name N/A N/A N/A  Get the shortest possible module name  N/A parts N/A N/A module_name split . N/A short_name module_name N/A i N/A range N/A N/A len parts 1 0 -1 N/A N/A short_name N/A N/A . join N/A parts N/A i N/A N/A N/A N/A from %s import %s N/A short_name obj_name N/A N/A N/A ImportError N/A N/A short_name N/A N/A . join N/A parts N/A N/A i 1 N/A N/A short_name N/A NameFinder N/A N/A ast NodeVisitor N/A N/A Finds the longest form of variable names and their imports in code

    Only retains names from imported modules.
     __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super NameFinder self __init__ N/A N/A self imported_names N/A N/A N/A self accessed_names N/A set N/A visit_Import N/A N/A self node prefix N/A N/A N/A alias N/A node names N/A N/A local_name N/A N/A alias asname N/A alias name N/A N/A N/A self imported_names N/A local_name N/A prefix N/A alias name N/A visit_ImportFrom N/A N/A self node N/A N/A N/A N/A N/A self visit_Import node N/A N/A node module . N/A visit_Name N/A N/A self node N/A N/A N/A N/A N/A N/A self accessed_names add N/A node id N/A visit_Attribute N/A N/A self node N/A N/A N/A attrs N/A N/A N/A isinstance node N/A ast Attribute N/A N/A N/A N/A attrs append N/A node attr N/A node N/A node value N/A N/A isinstance node N/A ast Name N/A N/A N/A N/A attrs append N/A node id N/A N/A N/A N/A self accessed_names add N/A N/A . join N/A reversed attrs N/A N/A N/A N/A self visit node N/A get_mapping N/A N/A self N/A N/A N/A name N/A self accessed_names N/A N/A local_name N/A N/A N/A name split . 1 N/A 0 N/A remainder N/A name N/A N/A len local_name N/A N/A local_name N/A self imported_names N/A N/A full_name N/A N/A N/A self imported_names N/A local_name remainder N/A N/A N/A name full_name N/A N/A identify_names N/A N/A code N/A N/A N/A Builds a codeobj summary by identifying and resovles used names

    >>> code = '''
    ... from a.b import c
    ... import d as e
    ... print(c)
    ... e.HelloWorld().f.g
    ... '''
    >>> for name, o in sorted(identify_names(code).items()):
    ...     print(name, o['name'], o['module'], o['module_short'])
    c c a.b a.b
    e.HelloWorld HelloWorld d d
     N/A finder N/A NameFinder N/A N/A N/A finder visit N/A N/A ast parse code N/A example_code_obj N/A N/A N/A name full_name N/A N/A finder get_mapping N/A N/A N/A module attribute N/A N/A full_name rsplit . 1 N/A module_short N/A get_short_module_name module attribute N/A cobj N/A name module module_short attribute module module_short N/A N/A example_code_obj N/A name cobj N/A example_code_obj N/A generate_file_rst N/A N/A fname target_dir src_dir root_dir plot_gallery N/A N/A N/A  Generate the rst file for a given example.

    Returns the set of sklearn functions/classes imported in the example.
     N/A base_image_name N/A N/A N/A N/A os path splitext fname N/A 0 N/A image_fname N/A %s_%%03d.png base_image_name N/A this_template rst_template N/A last_dir N/A N/A N/A N/A os path split src_dir N/A -1 N/A N/A N/A last_dir . N/A last_dir examples N/A N/A last_dir N/A N/A last_dir _ N/A short_fname N/A last_dir fname N/A src_file N/A N/A N/A os path join src_dir fname N/A example_file N/A N/A N/A os path join target_dir fname N/A N/A N/A shutil copyfile src_file example_file N/A figure_list N/A N/A image_dir N/A N/A N/A os path join target_dir images N/A thumb_dir N/A N/A N/A os path join image_dir thumb N/A N/A N/A N/A N/A os path exists image_dir N/A N/A N/A N/A os makedirs image_dir N/A N/A N/A N/A N/A os path exists thumb_dir N/A N/A N/A N/A os makedirs thumb_dir N/A image_path N/A N/A N/A os path join image_dir image_fname N/A stdout_path N/A N/A N/A os path join image_dir N/A stdout_%s.txt base_image_name N/A time_path N/A N/A N/A os path join image_dir N/A time_%s.txt base_image_name N/A thumb_file N/A N/A N/A os path join thumb_dir N/A N/A fname N/A -3 .png N/A time_elapsed 0 N/A time_m 0 N/A time_s 0 N/A N/A plot_gallery N/A N/A fname startswith plot N/A N/A first_image_file N/A image_path 1 N/A N/A N/A N/A os path exists stdout_path N/A N/A stdout N/A N/A N/A open stdout_path read N/A N/A stdout N/A N/A N/A N/A os path exists time_path N/A N/A time_elapsed N/A float N/A N/A N/A open time_path read N/A N/A N/A N/A N/A N/A os path exists first_image_file N/A N/A N/A N/A os stat first_image_file st_mtime N/A N/A N/A os stat src_file st_mtime N/A N/A N/A print N/A plotting %s fname N/A t0 N/A time N/A matplotlib.pyplot plt N/A N/A N/A plt close all N/A cwd N/A N/A os getcwd N/A N/A N/A N/A N/A orig_stdout N/A sys stdout N/A N/A N/A os chdir N/A N/A N/A os path dirname src_file N/A my_buffer N/A StringIO N/A my_stdout N/A Tee N/A sys stdout my_buffer N/A N/A sys stdout my_stdout N/A my_globals N/A pl plt N/A N/A execfile N/A N/A N/A os path basename src_file my_globals N/A time_elapsed N/A N/A time t0 N/A N/A sys stdout orig_stdout N/A my_stdout N/A N/A my_buffer getvalue N/A N/A __doc__ my_globals N/A N/A my_stdout N/A N/A my_stdout replace N/A my_globals N/A __doc__ N/A my_stdout N/A N/A my_stdout strip N/A my_stdout N/A N/A stdout N/A **Script output**::

  %s

 N/A N/A join N/A N/A my_stdout split N/A N/A N/A N/A open stdout_path w write stdout N/A N/A N/A N/A open time_path w write N/A %f time_elapsed N/A N/A N/A os chdir cwd N/A fig_managers N/A N/A N/A N/A matplotlib _pylab_helpers Gcf get_all_fig_managers N/A fig_mngr fig_managers N/A N/A N/A N/A plt figure N/A fig_mngr num N/A N/A N/A plt savefig N/A image_path N/A fig_mngr num N/A N/A N/A figure_list append N/A image_fname N/A fig_mngr num N/A N/A N/A N/A N/A print N/A 80 _ N/A N/A print N/A %s is not compiling: fname N/A N/A N/A traceback print_exc N/A N/A print N/A 80 _ N/A N/A N/A N/A os chdir cwd N/A N/A sys stdout orig_stdout N/A N/A print N/A  - time elapsed : %.2g sec time_elapsed N/A N/A figure_list N/A N/A f N/A N/A len image_dir N/A f N/A N/A glob glob N/A N/A image_path replace %03d [0-9][0-9][0-9] N/A N/A N/A figure_list sort N/A this_template plot_rst_template N/A car_thumb_path N/A N/A N/A os path join N/A N/A N/A N/A os path split root_dir N/A 0 _build/html/dev/_images/ N/A N/A N/A N/A N/A os path exists car_thumb_path N/A N/A N/A N/A os makedirs car_thumb_path N/A N/A N/A N/A os path exists first_image_file N/A N/A carousel_tfile N/A N/A N/A os path join car_thumb_path N/A N/A fname N/A -3 _carousel.png N/A first_img N/A image_fname 1 N/A N/A first_img carousel_thumbs N/A N/A N/A make_thumbnail N/A image_path N/A N/A carousel_thumbs N/A first_img N/A 0 carousel_tfile N/A N/A carousel_thumbs N/A first_img N/A 1 190 N/A N/A make_thumbnail first_image_file thumb_file 400 280 N/A N/A N/A N/A N/A os path exists thumb_file N/A N/A N/A make_thumbnail images/no_image.png thumb_file 200 140 N/A N/A docstring short_desc end_row N/A extract_docstring example_file N/A N/A N/A len figure_list 1 N/A N/A figure_name N/A figure_list N/A 0 N/A image_list N/A SINGLE_IMAGE N/A N/A figure_name lstrip / N/A N/A image_list HLIST_HEADER N/A figure_name figure_list N/A N/A image_list N/A HLIST_IMAGE_TEMPLATE N/A N/A figure_name lstrip / N/A N/A time_m time_s N/A divmod time_elapsed 60 N/A f N/A open N/A N/A N/A os path join target_dir N/A N/A fname N/A -2 rst w N/A N/A N/A f write N/A this_template N/A locals N/A N/A N/A f flush N/A example_code_obj N/A identify_names N/A N/A N/A open example_file read N/A example_code_obj N/A N/A codeobj_fname N/A N/A example_file N/A -3 _codeobj.pickle N/A N/A open codeobj_fname wb fid N/A N/A N/A N/A pickle dump example_code_obj fid N/A pickle HIGHEST_PROTOCOL N/A backrefs N/A set N/A N/A N/A {module_short}.{name} format entry N/A entry N/A N/A example_code_obj values N/A N/A N/A entry N/A module startswith sklearn N/A backrefs N/A embed_code_links N/A N/A app exception N/A N/A N/A Embed hyperlinks to documentation into example code N/A N/A N/A N/A exception None N/A N/A N/A N/A print Embedding documentation hyperlinks in examples.. N/A doc_resolvers N/A N/A N/A doc_resolvers N/A sklearn N/A SphinxDocLinkResolver N/A N/A app builder outdir relative True N/A N/A doc_resolvers N/A matplotlib N/A SphinxDocLinkResolver http://matplotlib.org N/A N/A doc_resolvers N/A numpy N/A SphinxDocLinkResolver http://docs.scipy.org/doc/numpy-1.6.0 N/A N/A doc_resolvers N/A scipy N/A SphinxDocLinkResolver http://docs.scipy.org/doc/scipy-0.11.0/reference N/A example_dir N/A N/A N/A os path join N/A N/A app builder srcdir auto_examples N/A html_example_dir N/A N/A N/A os path abspath N/A N/A N/A os path join N/A N/A app builder outdir auto_examples N/A link_pattern <a href="%s">%s</a> N/A orig_pattern <span class="n">%s</span> N/A period <span class="o">.</span> N/A N/A dirpath _ filenames N/A N/A os walk html_example_dir N/A N/A fname filenames N/A N/A N/A print N/A 	processing: %s fname N/A full_fname N/A N/A N/A os path join html_example_dir dirpath fname N/A subpath N/A dirpath N/A N/A N/A len html_example_dir 1 N/A pickle_fname N/A N/A N/A os path join example_dir subpath N/A N/A fname N/A -5 _codeobj.pickle N/A N/A N/A N/A os path exists pickle_fname N/A N/A N/A open pickle_fname rb fid N/A N/A example_code_obj N/A N/A pickle load fid N/A N/A N/A fid close N/A str_repl N/A N/A N/A name cobj N/A N/A example_code_obj items N/A N/A this_module N/A N/A N/A N/A cobj N/A module split . N/A 0 N/A N/A this_module doc_resolvers N/A N/A N/A link N/A N/A N/A doc_resolvers N/A this_module resolve cobj full_fname N/A N/A link None N/A N/A parts N/A N/A name split . N/A name_html N/A N/A period join N/A N/A orig_pattern part N/A part parts N/A N/A str_repl N/A name_html N/A link_pattern N/A link name_html N/A names N/A sorted str_repl key len reverse True N/A expr N/A N/A re compile N/A (?<!\.)\b N/A N/A | join N/A N/A N/A re escape name N/A name names substitute_link N/A N/A match N/A N/A N/A N/A str_repl N/A N/A N/A match group N/A N/A N/A N/A len str_repl 0 N/A N/A N/A open full_fname rb fid N/A N/A lines_in N/A N/A fid readlines N/A N/A open full_fname wb fid N/A N/A line lines_in N/A N/A line N/A N/A line decode utf-8 N/A line N/A N/A expr sub substitute_link line N/A N/A N/A fid write N/A N/A line encode utf-8 N/A N/A N/A HTTPError N/A e N/A N/A N/A print The following HTTP Error has occurred:
 N/A N/A print N/A e code N/A N/A URLError N/A e N/A N/A N/A print 
...
Warning: Embedding the documentation hyperlinks requires internet access.
Please check your network connection.
Unable to continue embedding due to a URL Error: 
 N/A N/A print N/A e args N/A N/A print [done] N/A setup N/A N/A app N/A N/A N/A N/A N/A app connect builder-inited generate_example_rst N/A N/A N/A app add_config_value plot_gallery True html N/A N/A N/A app connect build-finished embed_code_links N/A build_image_dir _build/html/_images N/A N/A N/A N/A os path exists build_image_dir N/A N/A filelist N/A N/A os listdir build_image_dir N/A filename filelist N/A N/A N/A N/A filename endswith png N/A N/A N/A N/A os remove N/A N/A N/A os path join build_image_dir filename N/A setup_module N/A N/A N/A N/A N/A N/A