Module Expr Str Import alias identifier ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore ListLoad Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr NameLoad Return SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad body Expr Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword Str orelse Assign NameStore Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr NameLoad Return SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword Str ExtSlice Index NameLoad Slice Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Assign NameStore BinOpSub Call AttributeLoad NameLoad attr keyword Num Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr NameLoad keyword Num Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListComp BinOpDiv BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad Call NameLoad NameLoad comprehension NameStore NameLoad keyword Num Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr Num Return SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareIn NameLoad NameLoad orelse Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareIn NameLoad NameLoad orelse Assign NameStore NameLoad orelse If CompareEq NameLoad Str body Assign NameStore Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Str If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore ListComp NameLoad comprehension NameStore NameLoad CompareIn NameLoad NameLoad orelse Assign NameStore NameLoad orelse If BoolOpOr CompareIsNot NameLoad NameLoad CompareEq NameLoad Str body Assign NameStore Str Assign NameStore Str orelse Assign NameStore Str Assign NameStore Str Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Return TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad NameLoad NameLoad body Expr Str If BoolOpAnd CompareIsNot NameLoad NameLoad BoolOpOr UnaryOpNot Call NameLoad NameLoad Str Call NameLoad NameLoad TupleLoad NameLoad NameLoad body Raise Call NameLoad BinOpAdd Str Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad If NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Str orelse Assign NameStore ListComp SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr keyword NameLoad keyword Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore BinOpAdd Str Call NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Assign NameStore ListLoad Str Str Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num NameLoad body Expr Str If BoolOpOr Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd Str NameLoad Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad Assign TupleStore NameStore NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr keyword Str Assign NameStore Str Assign NameStore ListLoad For NameStore Call NameLoad Call NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore BinOpAdd Str SubscriptLoad NameLoad Index NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Str Str Assign NameStore ListLoad Str Str Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad Num body Expr Str Assign TupleStore NameStore NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad attr Num orelse Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr ExtSlice Slice Index NameLoad attr Num Assign NameStore BinOpDiv NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad attr orelse Assign TupleStore NameStore NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore ListLoad If BoolOpOr Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad orelse Assign TupleStore NameStore NameStore Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore ListComp CompareEq SubscriptLoad NameLoad Index NameLoad NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListComp TupleLoad NameLoad NameLoad NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad comprehension TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index NameLoad If NameLoad body Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index AttributeLoad NameLoad attr Assign NameStore ListLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr Assign NameStore ListComp TupleLoad SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad comprehension TupleStore NameStore NameStore NameStore NameLoad orelse Assign NameStore ListLoad TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr TupleLoad Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd Str NameLoad Assign AttributeStore NameLoad attr ListLoad Str Str Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad NameLoad Str NameLoad Num NameLoad NameLoad NameLoad body Pass decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad NameLoad Str NameLoad Num NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign NameStore ListLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Str For NameStore Call NameLoad AttributeLoad NameLoad attr body AugAssignAdd AttributeStore SubscriptLoad NameLoad Index NameLoad attr Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad ListLoad Num NameLoad NameLoad NameLoad NameLoad Str body Pass decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad ListLoad Num NameLoad NameLoad NameLoad NameLoad Str body Expr Str Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Assign NameStore Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad NameLoad If CompareGt Call NameLoad NameLoad Num body Assign NameStore Call NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword Str keyword Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad NameLoad NameLoad Num NameLoad NameLoad NameLoad Str body Pass decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults ListLoad NameLoad NameLoad Num NameLoad NameLoad NameLoad Str NameLoad body Expr Str Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body If Call NameLoad NameLoad body Assign NameStore ListLoad NameLoad Assign NameStore Call NameLoad ListComp Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Str attr comprehension NameStore NameLoad ListLoad Assign NameStore ListComp NameLoad comprehension NameStore Call NameLoad AttributeLoad NameLoad attr CompareIn SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If NameLoad body Assign AttributeStore NameLoad attr Str Return NameLoad Assign AttributeStore NameLoad attr Str For NameStore Call NameLoad AttributeLoad NameLoad attr body AugAssignAdd AttributeStore SubscriptLoad NameLoad Index NameLoad attr Call AttributeLoad Str attr SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad Str body Pass decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num NameLoad NameLoad NameLoad NameLoad Str body Expr Str Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Return Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad NameLoad body Pass decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad NameLoad body Expr Str If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad NameLoad body Pass decorator_list Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults ListLoad NameLoad body Expr Str If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Num Return Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults ListLoad Num NameLoad NameLoad body Expr Str Import alias identifier If CompareEq Call NameLoad NameLoad Num body Assign NameStore ListLoad Num Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Slice SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad ListLoad NameLoad body Expr Str Import alias identifier If CompareEq Call NameLoad NameLoad Num body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call NameLoad Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr ExtSlice Slice Index NameLoad AugAssignDiv NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num If UnaryOpNot CompareEq NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword TupleLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list
N/A N/A 
Provides the class `LdaCgsViewer`.
 N/A numpy np vsm.spatial H JS_dist KL_div vsm.structarr * vsm.split split_corpus vsm.exceptions * types * labeleddata * wrappers * N/A __all__ N/A LdaCgsViewer LdaCgsViewer N/A object N/A N/A A class for viewing a topic model estimated by one of vsm's LDA
    classes using CGS.
     __init__ N/A N/A self corpus model N/A N/A N/A 
        Initialize LdaCgsViewer.

        :param corpus: Source of observed data.
        :type corpus: :class:`Corpus`
    
        :param model: An LDA model estimated by a CGS.
        :type model: LdaCgsSeq
         N/A N/A self corpus corpus N/A N/A self model model N/A N/A self _phi None N/A N/A self _theta None N/A N/A self _H_phi None N/A N/A self _H_theta None N/A N/A self _labels None N/A _doc_label_name N/A N/A self N/A N/A N/A N/A doc_label_name N/A N/A self model context_type N/A property _res_doc_type N/A N/A self doc N/A N/A N/A N/A res_doc_type N/A self corpus N/A N/A self model context_type N/A self _doc_label_name doc N/A _res_word_type N/A N/A self word N/A N/A N/A N/A res_word_type N/A self corpus word N/A labels N/A N/A self N/A N/A N/A Returns the list of document labels. N/A N/A N/A self _labels None N/A N/A N/A self _labels N/A N/A N/A self corpus view_metadata N/A N/A self model context_type N/A N/A self _labels N/A N/A self _labels N/A N/A self _doc_label_name N/A N/A self _labels N/A property phi N/A N/A self N/A N/A N/A Returns the word by topic matrix from the model as a right
        stochastic matrix (the columns phi_i are probability
        distributions).

         N/A N/A N/A self _phi None N/A N/A N/A self _phi N/A N/A N/A self model word_top N/A N/A N/A N/A self model word_top sum 0 N/A N/A self _phi N/A property theta N/A N/A self N/A N/A N/A Returns the topic by document matrix from the model as a right
        stochastic matrix (the columns theta_i are probability
        distributions.

         N/A N/A N/A self _theta None N/A N/A N/A self _theta N/A N/A N/A self model top_doc N/A N/A N/A N/A self model top_doc sum 0 N/A N/A self _theta N/A property H_phi N/A N/A self N/A N/A N/A Returns the entropies of the columns of phi (i.e., topics)

         N/A N/A N/A self _H_phi None N/A N/A N/A self _H_phi N/A H N/A N/A self phi T N/A N/A self _H_phi N/A property H_theta N/A N/A self N/A N/A N/A Returns the entropies of the columns of theta.

         N/A N/A N/A self _H_theta None N/A N/A N/A self _H_theta N/A H N/A N/A self theta T N/A N/A self _H_theta N/A property topic_entropies N/A N/A self print_len N/A 10 N/A N/A Returns the entropies of the topics of the model as an array sorted
        by entropy.

         N/A H_phi N/A self H_phi N/A k_arr N/A N/A N/A enum_sort H_phi view LabeledColumn N/A N/A k_arr col_header Topic Entropies N/A N/A k_arr subcol_headers N/A Index Entropy N/A N/A k_arr col_len print_len N/A N/A k_arr N/A -1 N/A doc_entropies N/A N/A self print_len label_fn as_strings N/A 10 def_label_fn True N/A N/A Returns the entropies of the distributions over topics as an
        array sorted by entropy.

         N/A as_strings N/A N/A md N/A N/A N/A self corpus view_metadata N/A N/A self model context_type N/A docs N/A label_fn md N/A d_arr N/A enum_sort N/A self H_theta indices docs field_name doc N/A N/A d_arr N/A enum_sort N/A self H_theta N/A d_arr N/A N/A d_arr view LabeledColumn N/A N/A d_arr col_header Document Entropies N/A N/A d_arr subcol_headers N/A Document Entropy N/A N/A d_arr col_len print_len N/A N/A d_arr N/A -1 N/A topic_oscillations N/A N/A self print_len div_fn N/A 10 KL_div N/A N/A Returns the oscillation in the divergences of documents
        from each topic k, represented as a categorical distribution
        over topics with mass concentrated at index k. 

        Oscillation is computed as the difference between the maximum
        and the minimum of the divergences.

        Returns an array sorted by descending oscillation.
         N/A topic_indices N/A N/A np arange N/A N/A self model K N/A pseudo_docs N/A N/A N/A np diag N/A N/A np ones N/A N/A self model K dtype d N/A N/A topic_indices N/A N/A rel_entropies N/A div_fn pseudo_docs N/A self theta N/A oscillations N/A N/A N/A rel_entropies max axis 1 N/A N/A rel_entropies min axis 1 N/A k_arr N/A N/A N/A enum_sort oscillations view LabeledColumn N/A N/A k_arr col_header Topic Oscillation N/A N/A k_arr subcol_headers N/A Index Oscillation N/A N/A k_arr col_len 10 N/A k_arr N/A topic_jsds N/A N/A self print_len N/A 10 N/A N/A Returns the partial N-way JSD of each topic, where N is the number of
        documents in the model. This measure captures the extent to which an
        individual topic is a reliable signal of a document's overall topic
        distribution.
        
        Returns an array sorted by descending partial JSD.
         N/A topic_indices N/A N/A np arange N/A N/A self model K N/A doc_tops N/A N/A self theta T N/A M N/A N/A N/A np sum doc_tops axis 0 N/A len doc_tops N/A pjsd N/A N/A np sum N/A N/A np array N/A N/A N/A D_i N/A N/A np log N/A D_i M N/A len doc_tops N/A D_i doc_tops axis 0 N/A k_arr N/A N/A N/A enum_sort pjsd view LabeledColumn N/A N/A k_arr col_header Topic Partial JSD N/A N/A k_arr subcol_headers N/A Index pJSD N/A N/A k_arr col_len 10 N/A N/A k_arr N/A -1 N/A _get_sort_header_topic_indices N/A N/A self sort topic_indices N/A None None N/A N/A  
        Returns a tuple of (str, seq) consisting of the column header and sort
        order for a given sort method.

        :param sort: Topic sort function.
        :type sort: string, values are "entropy", "oscillation", "index", "jsd",
            "user" (default if topic_indices set), "index" (default)
        
        :param topic_indices: List of indices of topics to be
            displayed. Default is all topics.
        :type topic_indices: list of integers
         N/A N/A sort entropy N/A N/A th Topics Sorted by Entropy N/A ent_sort N/A N/A N/A self topic_entropies N/A i N/A N/A topic_indices None N/A N/A ti N/A set topic_indices N/A topic_indices N/A k N/A k ent_sort N/A k ti N/A N/A topic_indices ent_sort N/A N/A N/A sort oscillation N/A N/A th Topics Sorted by Oscillation N/A osc_sort N/A N/A N/A self topic_oscillations N/A i N/A N/A topic_indices None N/A N/A ti N/A set topic_indices N/A topic_indices N/A k N/A k osc_sort N/A k ti N/A N/A topic_indices osc_sort N/A N/A N/A sort jsd N/A N/A th Topics Sorted by Partial JSD N/A jsd_sort N/A N/A N/A self topic_jsds N/A i N/A N/A topic_indices None N/A N/A ti N/A set topic_indices N/A topic_indices N/A k N/A k jsd_sort N/A k ti N/A N/A topic_indices jsd_sort N/A N/A N/A N/A topic_indices None N/A sort user N/A N/A sort user N/A th Topics Sorted by User N/A N/A sort index N/A th Topics Sorted by Index N/A topic_indices N/A range N/A N/A self model K N/A N/A th N/A N/A np array topic_indices N/A topics N/A N/A self topic_indices sort print_len as_strings compact_view topic_labels N/A None None 10 True True None N/A N/A 
        Returns a list of topics estimated by the model. 
        Each topic is represented by a list of words and the corresponding 
        probabilities.
        
        :param topic_indices: List of indices of topics to be
            displayed. Default is all topics.
        :type topic_indices: list of integers
        
        :param sort: Topic sort function.
        :type sort: string, values are "entropy", "oscillation", "index", "jsd",
            "user" (default if topic_indices set), "index" (default)

        :param print_len: Number of words shown for each topic. Default is 10.
        :type print_len: int, optional

        :param as_string: If `True`, each topic displays words rather than its
            integer representation. Default is `True`.
        :type as_string: boolean, optional
 
        :param compact_view: If `True`, topics are simply represented as
            their top `print_len` number of words. Otherwise, topics are
            shown as words and their probabilities. Default is `True`.
        :type compact_view: boolean, optional       
    
        :param topic_labels: List of strings that are names that correspond
            to the topics in `topic_indices`.
        :type topic_labels: list, optional

        :returns: an instance of :class:`DataTable`.
            A structured array of topics.
         N/A N/A N/A topic_indices None N/A N/A N/A hasattr topic_indices __len__ N/A isinstance topic_indices N/A str unicode N/A N/A N/A ValueError N/A Invalid value for topic_indices, must be a list of integers N/A N/A th topic_indices N/A N/A self _get_sort_header_topic_indices sort topic_indices topic_indices N/A phi N/A N/A self phi N/A N/A N/A topic_indices N/A as_strings N/A N/A k_arr N/A enum_matrix N/A phi T indices N/A N/A self corpus words field_name word N/A N/A ind N/A N/A N/A N/A self corpus words_int N/A word N/A word N/A N/A self corpus words N/A k_arr N/A enum_matrix N/A phi T indices ind field_name word N/A table N/A N/A N/A i k N/A enumerate topic_indices N/A N/A N/A topic_labels None N/A N/A ch N/A Topic  N/A str k N/A N/A ch N/A topic_labels N/A i N/A col N/A LabeledColumn N/A k_arr N/A i col_header ch col_len print_len N/A N/A N/A table append col N/A schc N/A Topic Words N/A schf N/A Word Prob N/A N/A DataTable table th compact_view compact_view subcolhdr_compact schc subcolhdr_full schf N/A doc_topics N/A N/A self doc_or_docs compact_view aggregate print_len topic_labels N/A False False 10 None N/A N/A 
        Returns the distribution over topics for the given documents.

        :param doc: Specifies the document whose distribution over topics is 
             returned. It can either be the ID number (integer) or the 
             name (string) of the document.
        :type doc: int or string
        
        :param print_len: Number of topics to be printed. Default is 10.
        :type print_len: int, optional
        
        :param compact_view: If `True`, topics are simply represented as
        their top `print_len` number of words. Otherwise, topics are
        shown as words and their probabilities. Default is `False`.
        :type compact_view: boolean, optional       

        :param topic_labels: List of strings that are names that correspond
            to the topics in `topic_indices`.
        :type topic_labels: list, optional

        :returns: an instance of :class:`LabeledColumn` or of :class: `DataTable`.
            An structured array of topics (represented by their
            number) and their corresponding probabilities or a list of
            such arrays.
         N/A N/A N/A isstr doc_or_docs N/A isint doc_or_docs N/A isinstance doc_or_docs dict N/A N/A N/A doc label N/A N/A self _res_doc_type doc_or_docs N/A k_arr N/A N/A N/A enum_sort N/A N/A self theta N/A N/A N/A doc view LabeledColumn N/A N/A k_arr col_header N/A Document:  label N/A N/A k_arr subcol_headers N/A Topic Prob N/A N/A k_arr col_len print_len N/A k_arr N/A N/A docs labels N/A zip N/A N/A N/A self _res_doc_type d N/A d doc_or_docs N/A k_arr N/A enum_matrix N/A N/A self theta T indices N/A range N/A N/A self model K field_name topic N/A th Distributions over Topics N/A table N/A N/A i N/A xrange N/A len docs N/A N/A N/A topic_labels None N/A N/A ch N/A Doc:  N/A labels N/A i N/A N/A ch N/A topic_labels N/A i N/A col N/A LabeledColumn N/A k_arr N/A N/A docs N/A i col_header ch col_len print_len N/A N/A N/A table append col N/A schc N/A Doc Topics N/A schf N/A Topic Prob N/A N/A DataTable table th compact_view compact_view subcolhdr_compact schc subcolhdr_full schf N/A aggregate_doc_topics N/A N/A self docs normed_sum print_len N/A False 10 N/A N/A Takes a list of documents identifiers and returns the sum of the
        distributions over topics corresponding to these topics,
        normalized to sum to 1. If normed_sum is True, the sum is
        weighted by document lengths, so that documents contribute
        uniformly to the aggregate distribution.

         N/A N/A docs labels N/A zip N/A N/A N/A self _res_doc_type d N/A d docs N/A normed_sum N/A N/A S N/A N/A N/A N/A self theta N/A N/A N/A docs sum 1 N/A N/A S N/A N/A N/A N/A N/A self model top_doc N/A N/A N/A docs sum 1 N/A S N/A S N/A N/A S sum N/A k_arr N/A N/A N/A enum_sort S view LabeledColumn N/A N/A k_arr col_header Aggregate Distribution over Topics N/A N/A k_arr subcol_headers N/A Topic Prob N/A N/A k_arr col_len print_len N/A k_arr N/A doc_topic_matrix N/A N/A self doc_or_docs N/A N/A N/A 
        Returns the distribution over topics for the given documents.

        :param doc: Specifies the document whose distribution over topics is 
             returned. It can either be the ID number (integer) or the 
             name (string) of the document.
        :type doc: int or string

        :returns: an instance of :class:`np.array`.
            An array of topics
         N/A N/A N/A isstr doc_or_docs N/A isint doc_or_docs N/A isinstance doc_or_docs dict N/A N/A N/A doc label N/A N/A self _res_doc_type doc_or_docs N/A k_arr N/A N/A N/A self theta N/A N/A N/A doc T N/A N/A N/A docs labels N/A zip N/A N/A N/A self _res_doc_type d N/A d doc_or_docs N/A k_arr N/A N/A N/A self theta N/A N/A N/A docs T N/A k_arr N/A view_documents N/A N/A self doc_or_docs as_strings N/A False N/A N/A 
        Returns the distribution over topics for the given documents.

        :param doc: Specifies the document whose distribution over topics is 
             returned. It can either be the ID number (integer) or the 
             name (string) of the document.
        :type doc: int or string

        :returns: an instance of :class:`np.array`.
            An array of topics
         N/A documents N/A N/A N/A N/A isstr doc_or_docs N/A isint doc_or_docs N/A isinstance doc_or_docs dict N/A N/A N/A doc label N/A N/A self _res_doc_type doc_or_docs N/A docs N/A list doc N/A N/A N/A docs labels N/A zip N/A N/A N/A self _res_doc_type d N/A d doc_or_docs N/A all_docs N/A N/A N/A self corpus view_contexts N/A N/A self model context_type as_strings as_strings N/A doc docs N/A N/A N/A N/A documents append N/A all_docs N/A doc N/A documents N/A word_topics N/A N/A self word as_strings N/A True N/A N/A 
        Searches for every occurrence of `word` in the entire corpus and returns 
        a list each row of which contains the name or ID number of document, 
        the relative position in the document, and the assigned topic number 
        for each occurrence of `word`.
        
        :param word: The word for which the search is performed.  
        :type word: string

        :param as_strings: If `True`, returns document names rather than 
            ID numbers. Default is `True`.
        :type as_strings: boolean, optional

        :returns: an instance of :class:`LabeledColumn`.
            A structured array consisting of three columns. Each column 
            is a list of:
            (1) name/ID of document containing `word`
            (2) relative position of `word` in the document
            (3) Topic number assigned to the token.
         N/A N/A w word N/A N/A self _res_word_type word N/A ct N/A N/A self model context_type N/A contexts N/A N/A N/A self corpus view_contexts ct N/A idx N/A N/A N/A contexts N/A d w N/A d N/A xrange N/A len contexts N/A Z N/A split_corpus N/A N/A self model Z N/A N/A self model indices N/A Z_w N/A N/A d i t N/A d N/A xrange N/A len Z N/A N/A i t N/A enumerate N/A Z N/A d N/A N/A idx N/A d N/A i N/A as_strings N/A N/A docs N/A N/A N/A N/A self corpus view_metadata ct N/A N/A self _doc_label_name N/A dt N/A N/A doc N/A docs dtype N/A pos N/A np int N/A value N/A np int N/A Z_w N/A N/A N/A docs N/A d i t N/A N/A d i t Z_w N/A N/A dt N/A N/A i N/A np int N/A pos N/A np int N/A value N/A np int N/A Z_w N/A N/A N/A N/A np array Z_w dtype dt view LabeledColumn N/A N/A Z_w col_header N/A Word:  word N/A N/A Z_w subcol_headers N/A Document Pos Topic N/A Z_w N/A sim_top_top N/A N/A self topic_or_topics weights dist_fn order show_topics print_len filter_nan as_strings compact_view N/A N/A JS_dist i True 10 True True True N/A N/A N/A N/A deprecated_meth dist_top_top dist_top_top N/A N/A self topic_or_topics weights dist_fn order show_topics print_len filter_nan as_strings compact_view topic_labels N/A N/A JS_dist i True 10 True True True None N/A N/A 
        Takes a topic or list of topics (by integer index) and returns
        a list of topics sorted by the distances between a given
        topic and every topic.
        
        :param topic_or_topics: Query topic(s) to which distances are calculated.
        :type topic_or_topics: integer or list of integers
        
        :param weights: Specify weights for each topic in `topic_or_topics`. 
            Default uses equal weights (i.e. arithmetic mean)
        :type weights: list of floating point, optional

        :param show_topics: If `True`, topics are represented by their number
            and distribution over words. Otherwise only topic numbers
            are shown. Default is `True`.
        :type show_topics: boolean, optional

        :param print_len: Number of topics to be shown. Default is 10.
        :type print_len: int, optional       

        :param filter_nan: If `True` not a number entries are filtered.
            Default is `True`.
        :type filter_nan: boolean, optional
        
        :param dist_fn: A distance function from functions in vsm.spatial. 
            Default is :meth:`JS_dist`.
        :type dist_fn: string, optional

        :param order: Order of sorting. 'i' for increasing and 'd' for
            decreasing order. Default is 'i'.
        :type order: string, optional

        :param as_strings: If `True`, words of each topic are represented as
            strings. Otherwise they are represented by their integer
            representation. Default is `True`.
        :type as_strings: boolean, optional

        :param compact_view: If `True`, topics are simply represented as
            their top `print_len` number of words. Otherwise, topics are
            shown as words and their probabilities. Default is `True`.
        :type compact_view: boolean, optional       
        
        :param topic_labels: List of strings that are names that correspond
            to the topics in `topic_indices`.
        :type topic_labels: list, optional

        :returns: an instance of :class:`LabeledColumn`.
            A 2-dim array containing topics and their distances to 
            `topic_or_topics`. 
        
        :See Also: :meth:`vsm.viewer.wrapper.dist_top_top`
         N/A Q N/A N/A N/A self model word_top N/A N/A N/A N/A self model word_top sum 0 N/A distances N/A dist_top_top Q topic_or_topics weights weights print_len print_len filter_nan filter_nan dist_fn dist_fn order order N/A show_topics N/A N/A topic_or_topics N/A topic_or_topics N/A topic_indices N/A distances N/A N/A N/A N/A distances dtype names N/A 0 N/A k_arr N/A N/A self topics topic_indices topic_indices print_len print_len as_strings as_strings compact_view compact_view topic_labels topic_labels N/A N/A k_arr table_header Sorted by Topic Distance N/A i N/A xrange N/A distances size N/A N/A N/A N/A k_arr N/A i col_header N/A N/A  ({0:.3f}) format N/A N/A distances N/A i N/A 1 N/A k_arr N/A distances N/A sim_top_doc N/A N/A self topic_or_topics weights filter_words print_len as_strings label_fn filter_nan dist_fn order N/A N/A N/A 10 True def_label_fn True JS_dist i N/A N/A N/A N/A deprecated_meth dist_top_doc dist_top_doc N/A N/A self topic_or_topics weights filter_words print_len as_strings label_fn filter_nan dist_fn order N/A N/A N/A 10 True def_label_fn True JS_dist i N/A N/A Takes a topic or list of topics (by integer index) and returns
        a list of documents sorted by distance.

        :param topic_or_topics: Query topic(s) relative to which
            distances are computed.
        :type topic_or_topics: string or list of strings
        
        :param weights: Specify weights for each topic in `topic_or_topics`. 
            Default uses equal weights (i.e. arithmetic mean)
        :type weights: list of floating point, optional

        :param filter_words: The topics that include these words are considered.
            If not provided, by default all topics are considered.
        :type filter_words: list of words, optional
 
        :param print_len: Number of documents printed by pretty-pringing function
            Default is 10.
        :type print_len: int, optional       
        
        :param as_strings: If `True`, returns a list of documents as strings rather
            than their integer representations. Default is `True`.
        :type as_strings: boolean, optional

        :param label_fn: A function that defines how documents are represented.
            Default is def_label_fn which retrieves the labels from corpus
            metadata.
        :type label_fn: string, optional

        :param filter_nan: If `True` not a number entries are filtered.
            Default is `True`.
        :type filter_nan: boolean, optional
        
        :param dist_fn: A distance function from functions in vsm.spatial. 
            Default is :meth:`JS_dist`.
        :type dist_fn: string, optional

        :param order: Order of sorting. 'i' for increasing and 'd' for
            decreasing order. Default is 'i'.
        :type order: string, optional

        :returns: an instance of :class:`LabeledColumn`.
            A 2-dim array containing documents and their posterior probabilities 
            to `topic_or_topics`. 

        :See Also: :meth:`def_label_fn`, :meth:`vsm.viewer.wrapper.dist_top_doc`

         N/A Q N/A N/A N/A self model top_doc N/A N/A N/A N/A self model top_doc sum 0 N/A d_arr N/A dist_top_doc topic_or_topics Q N/A self corpus N/A N/A self model context_type weights weights print_len print_len as_strings False label_fn label_fn filter_nan filter_nan dist_fn dist_fn N/A topics N/A res_top_type topic_or_topics N/A N/A N/A len filter_words 0 N/A N/A white N/A set N/A w filter_words N/A N/A l N/A N/A self word_topics w as_strings False N/A d N/A N/A l N/A i N/A N/A N/A np in1d N/A l N/A value topics N/A N/A N/A white update d N/A d_arr N/A d_arr N/A N/A N/A np in1d N/A d_arr N/A i white N/A as_strings N/A N/A md N/A N/A N/A self corpus view_metadata N/A N/A self model context_type N/A docs N/A label_fn md N/A d_arr N/A map_strarr d_arr docs k i new_k doc N/A d_arr N/A sim_word_top N/A N/A self word_or_words weights filter_nan show_topics print_len as_strings compact_view dist_fn order N/A N/A True True 10 True True JS_dist i N/A N/A N/A N/A deprecated_meth dist_word_top dist_word_top N/A N/A self word_or_words weights filter_nan show_topics print_len as_strings compact_view dist_fn order topic_labels N/A N/A True True 10 True True JS_dist i None N/A N/A Sorts topics according to their distance to the query
        `word_or_words`.
        
        A pseudo-topic from `word_or_words` as follows. If weights are
        not provided, the word list is represented in the space of
        topics as a topic which assigns equal non-zero probability to
        each word in `words` and 0 to every other word in the
        corpus. Otherwise, each word in `words` is assigned the
        provided weight.
        
        :param word_or_words: word(s) to which distances are calculated
        :type word_or_words: string or list of strings
        
        :param weights: Specify weights for each query word in `word_or_words`. 
            Default uses equal weights.
        :type weights: list of floating point, optional
        
        :param filter_nan: If `True` not a number entries are filtered.
            Default is `True`.
        :type filter_nan: boolean, optional
            
        :param show_topics: If `True`, topics are represented by their number
            and distribution over words. Otherwise, only topic numbers
            are shown. Default is `True`. 
        :type show_topics: boolean, optional

        :param print_len: Number of words printed by pretty-printing function.
            Default is 10.
        :type print_len: int, optional

        :param as_strings: If `True`, words of each topic are represented as
            strings. Otherwise they are represented by their integer 
            representation. Default is `True`.
        :type as_strings: boolean, optional

        :param compact_view: If `True`, topics are simply represented as
            their top `print_len` number of words. Otherwise, topics are
            shown as words and their probabilities. Default is `True`.
        :type compact_view: boolean, optional       
        
        :param dist_fn: A distance function from functions in vsm.spatial. 
            Default is :meth:`JS_dist`.
        :type dist_fn: string, optional

        :param order: Order of sorting. 'i' for increasing and 'd' for
            decreasing order. Default is 'i'.
        :type order: string, optional
        
        :param topic_labels: List of strings that are names that correspond
            to the topics in `topic_indices`.
        :type topic_labels: list, optional

        :returns: an instance of :class:`LabeledColumn`.
            A structured array of topics sorted by their distances 
            with `word_or_words`.
        
        :See Also: :meth:`vsm.viewer.wrapper.dist_word_top`

         N/A Q N/A N/A N/A self model word_top N/A N/A N/A N/A self model word_top sum 0 N/A distances N/A dist_word_top word_or_words N/A self corpus Q weights weights print_len print_len filter_nan filter_nan dist_fn dist_fn order order N/A show_topics N/A N/A N/A isstr word_or_words N/A N/A word_or_words N/A word_or_words N/A topic_indices N/A sum N/A N/A N/A N/A N/A N/A self word_topics w N/A value tolist N/A w word_or_words N/A N/A topic_indices N/A i N/A i N/A xrange N/A distances size N/A N/A N/A distances N/A i N/A 0 topic_indices N/A distances N/A distances N/A topic_indices N/A topic_indices N/A distances N/A N/A N/A N/A distances dtype names N/A 0 N/A k_arr N/A N/A self topics topic_indices topic_indices print_len print_len as_strings as_strings compact_view compact_view topic_labels topic_labels N/A compact_view N/A N/A N/A k_arr table_header Sorted by Topic Distance N/A k_arr N/A N/A k_arr table_header Sorted by Topic Distance N/A i N/A xrange N/A distances size N/A N/A N/A N/A k_arr N/A i col_header N/A N/A  ({0:.5f}) format N/A N/A distances N/A i N/A 1 N/A k_arr N/A distances N/A sim_doc_doc N/A N/A self doc_or_docs print_len filter_nan label_fn as_strings dist_fn order N/A 10 True def_label_fn True JS_dist i N/A N/A N/A N/A deprecated_meth dist_doc_doc dist_doc_doc N/A N/A self doc_or_docs print_len filter_nan label_fn as_strings dist_fn order N/A 10 True def_label_fn True JS_dist i N/A N/A Computes and sorts the distances between a document 
        or list of documents and every document in the topic space.
 
        :param doc_or_docs: Query document(s) relative to which
        distances are computed.
        :type doc_or_docs: string/integer or list of strings/integer.

        :param print_len: Number of words printed by pretty-printing function.
            Default is 10.
        :type print_len: int, optional

        :param filter_nan: If `True` not a number entries are filtered.
            Default is `True`.
        :type filter_nan: boolean, optional

        :param label_fn: A function that defines how documents are represented.
            Default is def_label_fn which retrieves the labels from corpus
            metadata.
        :type label_fn: string, optional

        :param as_strings: If `True`, returns a list of words rather than
            their integer representations. Default is `True`.
        :type as_strings: boolean, optional
        
        :param dist_fn: A distance function from functions in vsm.spatial. 
            Default is :meth:`JS_dist`.
        :type dist_fn: string, optional

        :param order: Order of sorting. 'i' for increasing and 'd' for
            decreasing order. Default is 'i'.
        :type order: string, optional
       
        :returns: an instance of `LabeledColumn`.
            A 2-dim array containing documents and their distances to 
            `doc_or_docs`. 
        
        :See Also: :meth:`vsm.viewer.wrapper.dist_doc_doc`

         N/A Q N/A N/A N/A self model top_doc N/A N/A N/A N/A self model top_doc sum 0 N/A N/A dist_doc_doc doc_or_docs N/A self corpus N/A N/A self model context_type Q print_len print_len filter_nan filter_nan label_fn label_fn as_strings as_strings dist_fn dist_fn order order N/A simmat_docs N/A N/A self docs dist_fn N/A N/A JS_dist N/A N/A N/A N/A deprecated_meth dismat_doc dismat_doc N/A N/A self docs dist_fn N/A N/A JS_dist N/A N/A 
        Calculates the distance matrix for a given list of documents.

        :param docs: A list of documents whose distance matrix is to be computed.
            Default is all the documents in the model.
        :type docs: list, optional
        
        :param dist_fn: A distance function from functions in vsm.spatial. 
            Default is :meth:`JS_dist`.
        :type dist_fn: string, optional

        :returns: an instance of :class:`IndexedSymmArray`.
            n x n matrix containing floats where n is the number of documents.

        :See Also: :meth:`vsm.viewer.wrapper.dismat_documents`
         N/A N/A N/A len docs 0 N/A N/A docs N/A range N/A N/A N/A N/A self model top_doc shape N/A 1 N/A Q N/A N/A N/A self model top_doc N/A N/A N/A N/A self model top_doc sum 0 N/A dm N/A dismat_doc docs N/A self corpus N/A N/A self model context_type Q dist_fn dist_fn N/A dm N/A simmat_topics N/A N/A self topics dist_fn N/A N/A JS_dist N/A N/A N/A N/A deprecated_meth dismat_top dismat_top N/A N/A self topics dist_fn N/A N/A JS_dist N/A N/A 
        Calculates the distance matrix for a given list of topics.

        :param topic_indices: A list of topics whose distance matrix is to be
            computed. Default is all topics in the model.
        :type topic_indices: list, optional
        
        :param dist_fn: A distance function from functions in vsm.spatial. 
            Default is :meth:`JS_dist`.
        :type dist_fn: string, optional

        :returns: an instance of :class:`IndexedSymmArray`.
            n x n matrix containing floats where n is the number of
            topics considered.
        
        :See Also: :meth:`vsm.viewer.wrapper.dismat_top`
         N/A N/A N/A len topics 0 N/A N/A topics N/A range N/A N/A N/A N/A self model word_top shape N/A 1 N/A Q N/A N/A N/A self model word_top N/A N/A N/A N/A self model word_top sum 0 N/A N/A dismat_top topics Q dist_fn dist_fn N/A dist N/A N/A self doc1 doc2 dist_fn N/A JS_dist N/A N/A Computes the distance between 2 documents in topic space.
 
        :param doc1: Query document        
        :type doc1: string/integer
 
        :param doc2: Query document        
        :type doc2: string/integer

        :param dist_fn: A distance function from functions in vsm.spatial. 
            Default is :meth:`JS_dist`.
        :type dist_fn: string, optional
       
        :returns: an instance of `LabeledColumn`.
            A 2-dim array containing documents and their distances to 
            `doc_or_docs`. 
         N/A N/A d1 d2 N/A N/A self doc_topic_matrix N/A doc1 doc2 N/A N/A dist_fn d1 d2 N/A logp_plot N/A N/A self range step show grid N/A N/A 1 True True N/A N/A 
        Returns a plot of log probabilities for the specified range of 
        the MCMC chain used to fit a topic model by `LDAGibbs`.
        The function requires matplotlib package. 

        :param range: Specifies the range of the MCMC chain whose log probabilites 
            are to be plotted. For example, range = [0, 999] plots log 
            probabilities from the 1st to the 1000th iterations. 
            The length of the list must be exactly two, and the first 
            element must be smaller than the second which can not exceed 
            the total length of the MCMC chain.
            Default produces the plot for the entire chain.
        :type range: list of integers, optional
        
        :param step: Steps by which points are plotted. Default is 1.
        :type step: int, optional

        :param show: If `True`, the function actually draws the plot 
            in addition to returning a plot object. Default is `True`.
        :type show: boolean, optional

        :param grid: If `True` draw a grid. Default is `True`. 
        :type grid: boolean, optional
        
        :returns: an instance of matplotlib.pyplot object.
            Contains the log probability plot. 
         N/A matplotlib.pyplot plt N/A N/A N/A len range 0 N/A N/A range N/A 0 N/A len N/A N/A self model log_probs N/A x N/A N/A logp N/A N/A N/A i lp N/A N/A N/A self model log_probs N/A N/A range N/A 0 N/A range N/A 1 step N/A N/A N/A N/A x append i N/A N/A N/A logp append lp N/A N/A N/A plt plot x logp N/A N/A N/A plt xlim N/A min x N/A max x N/A N/A N/A plt grid grid N/A N/A N/A plt title log probability / iteration N/A show N/A N/A N/A N/A plt show N/A plt N/A topic_hist N/A N/A self topic_indices d_indices show N/A None N/A True N/A N/A 
        Draws a histogram showing the proportion of topics within a set of
        documents specified by d_indices. 

        :param topic_indices: Specifies the topics for which proportions are 
             calculated. Default is all topics.
        :type doc: list of integers, optional
        
        :param d_indices: Specifies the document for which topic proportions
             are calculated. Default is all documents.
        :type d_indices: list of integers, optional

        :param show: shows plot if `True`. Default is `True`.
        :type d_indices: boolean, optional
        
        :returns: an instance of matplotlib.pyplot object.
             Contains the topic proportion histogram.
         N/A matplotlib.pyplot plt N/A N/A N/A len d_indices 0 N/A N/A i N/A N/A N/A N/A self corpus context_types index N/A N/A self model context_type N/A d_indices N/A xrange N/A len N/A N/A N/A self corpus context_data N/A i N/A td_mat N/A N/A N/A self model top_doc N/A N/A N/A d_indices N/A td_mat N/A N/A td_mat sum 0 N/A arr N/A N/A td_mat sum 1 N/A N/A N/A topic_indices None N/A N/A arr N/A arr N/A topic_indices N/A l N/A enum_sort arr N/A N/A rank prob N/A zip l N/A y_pos N/A N/A np arange N/A len rank N/A fig N/A N/A plt figure figsize N/A 10 10 N/A N/A N/A plt barh y_pos N/A list prob N/A N/A N/A plt yticks y_pos rank N/A N/A N/A plt xlabel Frequencies N/A N/A N/A plt title Topic Proportions N/A show N/A N/A N/A N/A plt show N/A plt N/A N/A