Module Expr Str Assign NameStore ListLoad Str Str Str Str Str Str Import alias Import alias identifier ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults kwarg body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Num Return ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad decorator_list Assign NameStore BinOpSub Num BinOpMult Num Num FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign TupleStore NameStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad keyword ListLoad Num NameLoad Num Assign TupleStore NameStore NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr Index NameLoad keyword BinOpAdd NameLoad Num keyword NameLoad keyword NameLoad keyword SubscriptLoad NameLoad Index Num keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpPow Num NameLoad Assign NameStore IfExp CompareLt NameLoad Num Call NameLoad NameLoad Num Return BinOpMod Str TupleLoad NameLoad BinOpMult Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword Str keyword Str keyword Str keyword Str keyword Str keyword Str Assign NameStore ListLoad BinOpMod Str NameLoad For NameStore NameLoad body Assign NameStore BinOpSub Call NameLoad Call AttributeLoad NameLoad attr BinOpSub SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Num Assign NameStore Call NameLoad keyword Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Call NameLoad AttributeLoad NameLoad attr BinOpSub NameLoad Num keyword Call NameLoad AttributeLoad NameLoad attr BinOpSub NameLoad Num keyword Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad keyword Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad keyword Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad keyword Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore IfExp Call AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad NameLoad attr Str Num Return Call NameLoad keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr Str keyword BinOpMult Call NameLoad Call AttributeLoad NameLoad attr Str BinOpPow Num NameLoad keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword Call NameLoad Call AttributeLoad NameLoad attr Str keyword TupleLoad Call NameLoad Call AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad NameLoad attr Str keyword TupleLoad Call NameLoad Call AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad NameLoad attr Str orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore TupleLoad Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad keyword Num orelse Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr BinOpPow BinOpMult NameLoad BinOpSub NameLoad NameLoad Num Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str ImportFrom alias alias alias alias alias alias alias Assign NameStore Call NameLoad NameLoad Str Assign NameStore BinOpDiv AttributeLoad BinOpAdd Num Call NameLoad TupleLoad UnaryOpUSub NameLoad UnaryOpUAdd NameLoad attr Num If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad Call NameLoad Call NameLoad BinOpMult NameLoad BinOpSub AttributeLoad NameLoad attr Num Num BinOpSub AttributeLoad NameLoad attr Num attr Str Return SubscriptLoad Call NameLoad NameLoad Index NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad BinOpDiv NameLoad Call NameLoad NameLoad Return SubscriptLoad NameLoad Index Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr CompareGtE SubscriptLoad NameLoad Slice Num SubscriptLoad NameLoad Slice Num If UnaryOpNot NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpDiv NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr Num Num Num Assign NameStore SubscriptLoad NameLoad Index NameLoad If Call AttributeLoad NameLoad attr NameLoad body Return Call NameLoad NameLoad NameLoad orelse Return ListComp Call NameLoad NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad BinOpAdd BinOpMult NameLoad NameLoad BinOpMult Call AttributeLoad NameLoad attr BinOpSub Num NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareGtE NameLoad NameLoad body Return TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse Assign NameStore BinOpSub SubscriptLoad NameLoad Slice NameLoad SubscriptLoad NameLoad Slice UnaryOpUSub NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return TupleLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index BinOpAdd NameLoad NameLoad decorator_list
N/A N/A 
Statistics helper functions.
 N/A __all__ N/A VarStats var_stats format_vars parse_var stats credible_intervals N/A re N/A numpy np formatnum format_uncertainty VarStats N/A object N/A __init__ N/A N/A self N/A kw N/A N/A N/A self __dict__ kw N/A N/A var_stats N/A N/A draw vars N/A None N/A N/A N/A vars None N/A N/A vars N/A range N/A N/A N/A draw points shape N/A 1 N/A N/A N/A _var_stats_one draw v N/A v vars N/A N/A ONE_SIGMA N/A 1 N/A 2 0.158655253931 _var_stats_one N/A N/A draw var N/A N/A N/A N/A weights values N/A N/A draw weights N/A N/A N/A N/A draw points N/A N/A N/A var flatten N/A best_idx N/A N/A np argmax N/A draw logp N/A best N/A values N/A best_idx N/A N/A p95 p68 p0 N/A credible_intervals x values weights weights ci N/A 0.95 ONE_SIGMA 0.0 N/A N/A mean std N/A stats x values weights weights N/A vstats N/A VarStats label N/A N/A draw labels N/A var index N/A var 1 p95 p95 p68 p68 median N/A p0 N/A 0 mean mean std std best best N/A vstats N/A format_num N/A N/A x place N/A N/A N/A precision N/A 10 place N/A digits_after_decimal N/A N/A place 0 N/A abs place 0 N/A N/A %.*f N/A digits_after_decimal N/A N/A N/A np round N/A x precision precision N/A format_vars N/A N/A all_vstats N/A N/A N/A v N/A dict parameter Parameter mean mean median median best best interval68 68% interval interval95 95% interval N/A s N/A N/A    %(parameter)20s %(mean)10s %(median)7s %(best)7s [%(interval68)15s] [%(interval95)15s] v N/A v all_vstats N/A N/A place N/A N/A int N/A N/A np log10 N/A N/A N/A v p95 N/A 1 N/A N/A v p95 N/A 0 2 N/A summary N/A dict mean N/A format_uncertainty N/A v mean N/A v std median N/A format_num N/A v median N/A place 1 best N/A format_num N/A v best N/A place 1 lo68 N/A format_num N/A N/A v p68 N/A 0 place hi68 N/A format_num N/A N/A v p68 N/A 1 place loci N/A format_num N/A N/A v p95 N/A 0 place hici N/A format_num N/A N/A v p95 N/A 1 place parameter N/A v label index N/A v index N/A N/A N/A s append N/A %(index)2d %(parameter)20s %(mean)10s %(median)7s %(best)7s [%(lo68)7s %(hi68)7s] [%(loci)7s %(hici)7s] summary N/A N/A N/A join s N/A N/A VAR_PATTERN N/A N/A re compile 
   ^\ *
   (?P<parnum>[0-9]+)\ +
   (?P<parname>.+?)\ +
   (?P<mean>[0-9.-]+?)
   \((?P<err>[0-9]+)\)
   (e(?P<exp>[+-]?[0-9]+))?\ +
   (?P<median>[0-9.eE+-]+?)\ +
   (?P<best>[0-9.eE+-]+?)\ +
   \[\ *(?P<lo68>[0-9.eE+-]+?)\ +
   (?P<hi68>[0-9.eE+-]+?)\]\ +
   \[\ *(?P<lo95>[0-9.eE+-]+?)\ +
   (?P<hi95>[0-9.eE+-]+?)\]
   \ *$
    N/A re VERBOSE parse_var N/A N/A line N/A N/A N/A 
    Parse a line returned by format_vars back into the statistics for the
    variable on that line.
     N/A m N/A N/A VAR_PATTERN match line N/A m N/A N/A exp N/A N/A N/A m group exp N/A int N/A N/A m group exp 0 N/A N/A VarStats index N/A int N/A N/A m group parnum name N/A N/A m group parname mean N/A N/A float N/A N/A m group mean N/A 10 exp median N/A float N/A N/A m group median best N/A float N/A N/A m group best p68 N/A N/A float N/A N/A m group lo68 N/A float N/A N/A m group hi68 p95 N/A N/A float N/A N/A m group lo95 N/A float N/A N/A m group hi95 N/A N/A None N/A stats N/A N/A x weights N/A None N/A N/A 
    Find mean and standard deviation of a set of weighted samples.

    Note that the median is not strictly correct (we choose an endpoint
    of the sample for the case where the median falls between two values
    in the sample), but this is good enough when the sample size is large.
     N/A N/A weights None N/A N/A x N/A N/A np sort x N/A N/A mean std N/A N/A N/A np mean x N/A N/A np std x ddof 1 N/A N/A mean N/A N/A N/A np mean N/A x weights N/A N/A np sum weights N/A var N/A N/A N/A np sum N/A N/A weights N/A x mean 2 N/A N/A np sum weights N/A std N/A N/A np sqrt var N/A N/A mean std N/A credible_intervals N/A N/A x ci weights N/A None N/A N/A 
    Find the credible interval covering the portion *ci* of the data.

    *x* are samples from the posterior distribution.

    *ci* is a set of intervals in [0,1].  For a $1-\sigma$ interval use
    *ci=erf(1/sqrt(2))*, or 0.68. About 1e5 samples are needed for 2 digits
    of  precision on a $1-\sigma$ credible interval.  For a 95% interval,
    about 1e6 samples are needed.

    *weights* is a vector of weights for each x, or None for unweighted.
    One could weight points according to temperature in a parallel tempering
    dataset.

    Returns an array *[[x1_low, x1_high], [l2_low, x2_high], ...]* where
    *[xi_low, xi_high]* are the starting and ending values for credible
    interval *i*.

    This function is faster if the inputs are already sorted.
     numpy asarray vstack sort cumsum searchsorted round clip N/A ci N/A asarray ci d N/A target N/A N/A N/A 1 N/A vstack N/A N/A ci N/A ci T 2 N/A N/A weights None N/A N/A idx N/A N/A N/A clip N/A round N/A target N/A N/A x size 1 0 N/A N/A x size 1 astype i N/A N/A N/A sort x N/A idx N/A N/A idx N/A N/A np argsort x N/A N/A x weights N/A N/A x N/A idx N/A weights N/A idx N/A w N/A cumsum N/A weights N/A sum weights N/A N/A x N/A N/A searchsorted w target N/A shortest_credible_interval N/A N/A x ci weights N/A 0.95 None N/A N/A 
    Find the credible interval covering the portion *ci* of the data.
    Returns the minimum and maximum values of the interval.
    If *ci* is a vector, return a vector of intervals.
    *x* are samples from the posterior distribution.
    This function is faster if the inputs are already sorted.
    About 1e6 samples are needed for 2 digits of precision on a 95%
    credible interval, or 1e5 for 2 digits on a 1-sigma credible interval.
    *ci* is the interval size in (0,1], and defaults to 0.95.  For a
    1-sigma interval use *ci=erf(1/sqrt(2))*.
    *weights* is a vector of weights for each x, or None for unweighted.
    For log likelihood data, setting weights to exp(max(logp)-logp) should
    give reasonable results.
     N/A sorted N/A N/A np all N/A N/A x N/A 1 N/A x N/A -1 N/A N/A sorted N/A N/A idx N/A N/A np argsort x N/A x N/A x N/A idx N/A N/A weights None N/A N/A weights N/A weights N/A idx N/A N/A weights None N/A N/A w N/A N/A np cumsum N/A weights N/A sum weights N/A idx N/A N/A np searchsorted w N/A N/A np arange 0 1 0.001 N/A x N/A x N/A idx N/A N/A N/A np isscalar ci N/A N/A N/A _find_interval x ci N/A N/A N/A N/A _find_interval x i N/A i ci N/A _find_interval N/A N/A x ci N/A N/A N/A 
    Find credible interval ci in sorted, unweighted x
     N/A n N/A len x N/A size N/A int N/A N/A ci n N/A N/A N/A np sqrt N/A 1 ci N/A N/A np log n N/A N/A size n N/A N/A N/A N/A x N/A 0 N/A x N/A -1 N/A N/A width N/A N/A x N/A size N/A x N/A N/A size N/A idx N/A N/A np argmin width N/A N/A N/A x N/A idx N/A x N/A N/A idx size N/A