Module Expr Str ImportFrom alias alias alias alias Import alias ImportFrom alias alias ImportFrom alias Import alias identifier Import alias identifier Import alias Import alias identifier Import alias identifier Import alias identifier Import alias ImportFrom alias Import alias FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return BinOpDiv Call AttributeLoad NameLoad attr BinOpDiv BinOpMult Num BinOpPow BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad Num NameLoad Call AttributeLoad NameLoad attr BinOpMult BinOpMult Num AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpDiv BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad BinOpAdd NameLoad NameLoad Assign NameStore BinOpDiv Num BinOpAdd BinOpDiv Num NameLoad BinOpDiv Num NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Return TupleLoad BinOpAdd NameLoad NameLoad BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpMult Num AttributeLoad NameLoad attr SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num Assign NameStore BinOpSub NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr attr NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad attr attr NameLoad Return Call AttributeLoad NameLoad attr BinOpMult Num BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad TupleLoad Num Num NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BinOpDiv BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore ListLoad Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num BinOpDiv BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index TupleLoad Num Num SubscriptLoad NameLoad Index TupleLoad Num Num Assign NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore BinOpMult NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assert CompareGtE NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Str Str Num NameLoad NameLoad Str body Expr Str Assert BoolOpOr CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad Assert UnaryOpNot BoolOpAnd CompareIs NameLoad NameLoad CompareIs NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Str If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore ListLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Assign NameStore BinOpMult SubscriptLoad NameLoad Index Num Num Assign NameStore BinOpMult SubscriptLoad NameLoad Index Num Num For NameStore NameLoad body Assign NameStore Call NameLoad keyword NameLoad keyword BinOpMult NameLoad NameLoad keyword BinOpMult NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Str keyword NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore TupleLoad BinOpDiv NameLoad Num BinOpDiv NameLoad Num Expr Call AttributeLoad NameLoad attr ListLoad NameLoad BinOpAdd NameLoad BinOpMult NameLoad Call NameLoad BinOpAdd NameLoad BinOpDiv AttributeLoad NameLoad attr Num ListLoad NameLoad BinOpAdd NameLoad BinOpMult NameLoad Call NameLoad BinOpAdd NameLoad BinOpDiv AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr ListLoad NameLoad BinOpAdd NameLoad BinOpMult NameLoad Call NameLoad NameLoad ListLoad NameLoad BinOpAdd NameLoad BinOpMult NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad BinOpSub Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad Assign NameStore BinOpSub BinOpMult NameLoad NameLoad BinOpMult NameLoad NameLoad Return CompareLtE BinOpAdd BinOpPow BinOpDiv NameLoad NameLoad Num BinOpPow BinOpDiv NameLoad NameLoad Num Num Return CompareLtE BinOpAdd BinOpDiv BinOpPow BinOpSub BinOpMult BinOpSub NameLoad NameLoad NameLoad BinOpMult BinOpSub NameLoad NameLoad NameLoad Num BinOpPow NameLoad Num BinOpDiv BinOpPow BinOpAdd BinOpMult BinOpSub NameLoad NameLoad NameLoad BinOpMult BinOpSub NameLoad NameLoad NameLoad Num BinOpPow NameLoad Num Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Expr AttributeLoad NameLoad attr If CompareNotEq Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Index Num Return NameLoad handlers ExceptHandler body Return BinOpMult Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num Assign TupleStore NameStore NameStore AttributeLoad Call NameLoad keyword TupleLoad Num Num keyword NameLoad keyword Num attr Assign NameStore Num Assign TupleStore NameStore NameStore NameStore Call NameLoad NameLoad NameLoad Expr Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Num Assign NameStore ListLoad For NameStore Call NameLoad Call NameLoad NameLoad body If Call NameLoad SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Num Num NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str AugAssignAdd NameStore Num orelse Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call NameLoad keyword TupleLoad Num Num keyword NameLoad keyword NameLoad keyword Str Expr Call NameLoad BinOpDiv NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Assign NameStore TupleLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num Num Expr Call NameLoad NameLoad NameLoad keyword ListLoad Num Num Num keyword Str keyword Num Expr Call NameLoad NameLoad NameLoad keyword ListLoad Num Num Num keyword Str keyword Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num NameLoad Assign NameStore BinOpMult Num Call AttributeLoad NameLoad attr BinOpMult Num NameLoad Num Return BinOpAdd BinOpDiv NameLoad Call AttributeLoad NameLoad attr BinOpDiv NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad attr NameLoad Return NameLoad decorator_list If CompareEq NameLoad Str body Assign NameStore Call NameLoad Num Num Expr Call NameLoad Num Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Num AugAssignDiv NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad keyword NameLoad keyword NameLoad Expr Str
N/A N/A Copyright 2015 Roger R Labbe Jr.

FilterPy library.
http://github.com/rlabbe/filterpy

Documentation at:
https://filterpy.readthedocs.org

Supporting book at:
https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python

This is licensed under an MIT license. See the readme.MD file
for more information.
 __future__ absolute_import division print_function unicode_literals N/A math math cos sin matplotlib.patches Ellipse N/A matplotlib.pyplot plt N/A numpy np N/A random N/A scipy.linalg linalg N/A scipy.sparse sp N/A scipy.sparse.linalg spln N/A scipy.stats scipy.stats norm N/A warnings gaussian N/A N/A x mean var N/A N/A N/A returns normal distribution (pdf) for x given a Gaussian with the
    specified mean and variance. All must be scalars.

    gaussian (1,2,3) is equivalent to scipy.stats.norm(2,math.sqrt(3)).pdf(1)
    It is quite a bit faster albeit much less flexible than the latter.

    Parameters
    ----------

    x : scalar or array-like
        The value for which we compute the probability

    mean : scalar
        Mean of the Gaussian

    var : scalar
        Variance of the Gaussian

    Returns
    -------

    probability : float
        probability of x for the Gaussian (mean, var). E.g. 0.101 denotes
        10.1%.

    Examples
    --------

    >>> gaussian(8, 1, 2)
    1.3498566943461957e-06

    >>> gaussian([8, 7, 9], 1, 2)
    array([1.34985669e-06, 3.48132630e-05, 3.17455867e-08])
     N/A N/A N/A N/A np exp N/A N/A -0.5 N/A N/A N/A N/A np asarray x mean 2 var N/A N/A math sqrt N/A N/A 2 N/A math pi var N/A mul N/A N/A mean1 var1 mean2 var2 N/A N/A N/A  multiply Gaussians (mean1, var1) with (mean2, var2) and return the
    results as a tuple (mean,var).

    var1 and var2 are variances - sigma squared in the usual parlance.
     N/A mean N/A N/A N/A var1 mean2 N/A var2 mean1 N/A var1 var2 N/A var N/A 1 N/A N/A 1 var1 N/A 1 var2 N/A N/A mean var N/A add N/A N/A mean1 var1 mean2 var2 N/A N/A N/A  add the Gaussians (mean1, var1) with (mean2, var2) and return the
    results as a tuple (mean,var).

    var1 and var2 are variances - sigma squared in the usual parlance.
     N/A N/A N/A mean1 mean2 N/A var1 var2 N/A multivariate_gaussian N/A N/A x mu cov N/A N/A N/A  This is designed to replace scipy.stats.multivariate_normal
    which is not available before version 0.14. You may either pass in a
    multivariate set of data:

    .. code-block:: Python

       multivariate_gaussian (array([1,1]), array([3,4]), eye(2)*1.4)
       multivariate_gaussian (array([1,1,1]), array([3,4,5]), 1.4)

    or unidimensional data:

    .. code-block:: Python

       multivariate_gaussian(1, 3, 1.4)

    In the multivariate case if cov is a scalar it is interpreted as eye(n)*cov

    The function gaussian() implements the 1D (univariate)case, and is much
    faster than this function.

    equivalent calls:

    .. code-block:: Python

      multivariate_gaussian(1, 2, 3)
       scipy.stats.multivariate_normal(2,3).pdf(1)


    Parameters
    ----------

    x : float, or np.array-like
       Value to compute the probability for. May be a scalar if univariate,
       or any type that can be converted to an np.array (list, tuple, etc).
       np.array is best for speed.

    mu :  float, or np.array-like
       mean for the Gaussian . May be a scalar if univariate,  or any type
       that can be converted to an np.array (list, tuple, etc).np.array is
       best for speed.

    cov :  float, or np.array-like
       Covariance for the Gaussian . May be a scalar if univariate,  or any
       type that can be converted to an np.array (list, tuple, etc).np.array is
       best for speed.

    Returns
    -------

    probability : float
        probability for x for the Gaussian (mu,cov)
     N/A x N/A N/A N/A N/A np array x copy False ndmin 1 flatten N/A mu N/A N/A N/A N/A np array mu copy False ndmin 1 flatten N/A nx N/A len mu N/A cov N/A _to_cov cov nx N/A norm_coeff N/A N/A nx N/A N/A math log N/A 2 N/A math pi N/A N/A N/A N/A np linalg slogdet cov N/A 1 N/A err N/A x mu N/A N/A N/A sp issparse cov N/A N/A numerator N/A N/A N/A N/A N/A spln spsolve cov err T dot err N/A N/A numerator N/A N/A N/A N/A N/A N/A np linalg solve cov err T dot err N/A N/A N/A math exp N/A -0.5 N/A norm_coeff numerator N/A multivariate_multiply N/A N/A m1 c1 m2 c2 N/A N/A N/A  Multiplies the two multivariate Gaussians together and returns the
    results as the tuple (mean, covariance).

    Examples
    --------

    .. code-block:: Python

        m, c = multivariate_multiply([7.0, 2], [[1.0, 2.0], [2.0, 1.0]],
                                     [3.2, 0], [[8.0, 1.1], [1.1,8.0]])

    Parameters
    ----------

    m1 : array-like
        Mean of first Gaussian. Must be convertable to an 1D array via
        numpy.asarray(), For example 6, [6], [6, 5], np.array([3, 4, 5, 6])
        are all valid.

    c1 : matrix-like
        Mean of first Gaussian. Must be convertable to an 2D array via
        numpy.asarray().

     m2 : array-like
        Mean of second Gaussian. Must be convertable to an 1D array via
        numpy.asarray(), For example 6, [6], [6, 5], np.array([3, 4, 5, 6])
        are all valid.

    c2 : matrix-like
        Mean of second Gaussian. Must be convertable to an 2D array via
        numpy.asarray().

    Returns
    -------

    m : ndarray
        mean of the result

    c : ndarray
        covariance of the result
     N/A C1 N/A N/A np asarray c1 N/A C2 N/A N/A np asarray c2 N/A M1 N/A N/A np asarray m1 N/A M2 N/A N/A np asarray m2 N/A sum_inv N/A N/A N/A np linalg inv N/A C1 C2 N/A C3 N/A N/A N/A N/A np dot C1 sum_inv dot C2 N/A M3 N/A N/A N/A N/A N/A np dot C2 sum_inv dot M1 N/A N/A N/A N/A np dot C1 sum_inv dot M2 N/A N/A M3 C3 N/A plot_discrete_cdf N/A N/A xs ys ax xlabel ylabel label N/A None None None None N/A N/A Plots a normal distribution CDF with the given mean and variance.
    x-axis contains the mean, the y-axis shows the cumulative probability.

    Parameters
    ----------

    xs : list-like of scalars
        x values corresponding to the values in `y`s. Can be `None`, in which
        case range(len(ys)) will be used.

    ys : list-like of scalars
        list of probabilities to be plotted which should sum to 1.

    ax : matplotlib axes object, optional
        If provided, the axes to draw on, otherwise plt.gca() is used.

    xlim, ylim: (float,float), optional
        specify the limits for the x or y axis as tuple (low,high).
        If not specified, limits will be automatically chosen to be 'nice'

    xlabel : str,optional
        label for the x-axis

    ylabel : str, optional
        label for the y-axis

    label : str, optional
        label for the legend

    Returns
    -------
        axis of plot
     N/A N/A ax None N/A N/A ax N/A N/A plt gca N/A N/A xs None N/A N/A xs N/A range N/A len ys N/A ys N/A N/A np cumsum ys N/A N/A N/A ax plot xs ys label label N/A N/A N/A ax set_xlabel xlabel N/A N/A N/A ax set_ylabel ylabel N/A ax N/A plot_gaussian_cdf N/A N/A mean variance ax xlim ylim xlabel ylabel label N/A 0.0 1.0 None None N/A 0.0 1.0 None None None N/A N/A Plots a normal distribution CDF with the given mean and variance.
    x-axis contains the mean, the y-axis shows the cumulative probability.

    Parameters
    ----------

    mean : scalar, default 0.
        mean for the normal distribution.

    variance : scalar, default 0.
        variance for the normal distribution.

    ax : matplotlib axes object, optional
        If provided, the axes to draw on, otherwise plt.gca() is used.

    xlim, ylim: (float,float), optional
        specify the limits for the x or y axis as tuple (low,high).
        If not specified, limits will be automatically chosen to be 'nice'

    xlabel : str,optional
        label for the x-axis

    ylabel : str, optional
        label for the y-axis

    label : str, optional
        label for the legend

    Returns
    -------
        axis of plot
     N/A N/A ax None N/A N/A ax N/A N/A plt gca N/A sigma N/A N/A math sqrt variance N/A n N/A N/A N/A scipy stats norm mean sigma N/A N/A xlim None N/A N/A xlim N/A N/A N/A n ppf 0.001 N/A N/A n ppf 0.999 N/A xs N/A N/A np arange N/A xlim N/A 0 N/A xlim N/A 1 N/A N/A N/A xlim N/A 1 N/A xlim N/A 0 1000.0 N/A cdf N/A N/A n cdf xs N/A N/A N/A ax plot xs cdf label label N/A N/A N/A ax set_xlim xlim N/A N/A N/A ax set_ylim ylim N/A N/A N/A ax set_xlabel xlabel N/A N/A N/A ax set_ylabel ylabel N/A ax N/A plot_gaussian_pdf N/A N/A mean variance ax mean_line xlim ylim xlabel ylabel label N/A 0.0 1.0 None False None None None None None N/A N/A Plots a normal distribution PDF with the given mean and variance.
    x-axis contains the mean, the y-axis shows the probability density.

    Parameters
    ----------

    mean : scalar, default 0.
        mean for the normal distribution.

    variance : scalar, default 0.
        variance for the normal distribution.

    ax : matplotlib axes object, optional
        If provided, the axes to draw on, otherwise plt.gca() is used.

    mean_line : boolean
        draws a line at x=mean

    xlim, ylim: (float,float), optional
        specify the limits for the x or y axis as tuple (low,high).
        If not specified, limits will be automatically chosen to be 'nice'

    xlabel : str,optional
        label for the x-axis

    ylabel : str, optional
        label for the y-axis

    label : str, optional
        label for the legend

    Returns
    -------
        axis of plot
     N/A N/A ax None N/A N/A ax N/A N/A plt gca N/A sigma N/A N/A math sqrt variance N/A n N/A N/A N/A scipy stats norm mean sigma N/A N/A xlim None N/A N/A xlim N/A N/A N/A n ppf 0.001 N/A N/A n ppf 0.999 N/A xs N/A N/A np arange N/A xlim N/A 0 N/A xlim N/A 1 N/A N/A N/A xlim N/A 1 N/A xlim N/A 0 1000.0 N/A N/A N/A ax plot xs N/A N/A n pdf xs label label N/A N/A N/A ax set_xlim xlim N/A N/A ylim None N/A N/A N/A N/A ax set_ylim ylim N/A mean_line N/A N/A N/A N/A plt axvline mean N/A N/A xlabel None N/A N/A N/A N/A ax set_xlabel xlabel N/A N/A ylabel None N/A N/A N/A N/A ax set_ylabel ylabel N/A ax N/A plot_gaussian N/A N/A mean variance ax mean_line xlim ylim xlabel ylabel label N/A 0.0 1.0 None False None None None None None N/A N/A  DEPRECATED. Use plot_gaussian_pdf() instead. This is poorly named, as
    there are multiple ways to plot a Gaussian.

    Plots a normal distribution PDF with the given mean and variance.
    x-axis contains the mean, the y-axis shows the probability density.

    Parameters
    ----------

    ax : matplotlib axes object, optional
        If provided, the axes to draw on, otherwise plt.gca() is used.

    mean_line : boolean
        draws a line at x=mean

    xlim, ylim: (float,float), optional
        specify the limits for the x or y axis as tuple (low,high).
        If not specified, limits will be automatically chosen to be 'nice'

    xlabel : str,optional
        label for the x-axis

    ylabel : str, optional
        label for the y-axis

    label : str, optional
        label for the legend
     N/A N/A N/A warnings warn This function is deprecated. It is poorly named. A Gaussian can be plotted as a PDF or CDF. This plots a PDF. Use plot_gaussian_pdf() instead, DeprecationWarning N/A N/A plot_gaussian_pdf mean variance ax mean_line xlim ylim xlabel ylabel label N/A covariance_ellipse N/A N/A P deviations N/A 1 N/A N/A  returns a tuple defining the ellipse representing the 2 dimensional
    covariance matrix P.

    Parameters
    ----------

    P : nd.array shape (2,2)
       covariance matrix

    deviations : int (optional, default = 1)
       # of standard deviations. Default is 1.

    Returns (angle_radians, width_radius, height_radius)
     N/A N/A U s v N/A N/A linalg svd P N/A orientation N/A N/A math atan2 N/A U N/A N/A 1 0 N/A U N/A N/A 0 0 N/A width N/A deviations N/A N/A math sqrt N/A s N/A 0 N/A height N/A deviations N/A N/A math sqrt N/A s N/A 1 N/A N/A width height N/A N/A orientation width height N/A plot_covariance_ellipse N/A N/A mean cov variance std ellipse title axis_equal show_semiaxis facecolor edgecolor fc ec alpha xlim ylim ls N/A None 1.0 None None None True False None None none #004080 1.0 None None solid N/A N/A  plots the covariance ellipse where

    mean is a (x,y) tuple for the mean of the covariance (center of ellipse)

    cov is a 2x2 covariance matrix.

    `variance` is the normal sigma^2 that we want to plot. If list-like,
    ellipses for all ellipses will be ploted. E.g. [1,2] will plot the
    sigma^2 = 1 and sigma^2 = 2 ellipses. Alternatively, use std for the
    standard deviation, in which case `variance` will be ignored.

    ellipse is a (angle,width,height) tuple containing the angle in radians,
    and width and height radii.

    You may provide either cov or ellipse, but not both.

    plt.show() is not called, allowing you to plot multiple things on the
    same figure.
     N/A N/A N/A cov None N/A ellipse None N/A N/A N/A N/A cov None N/A ellipse None N/A N/A facecolor None N/A N/A facecolor fc N/A N/A edgecolor None N/A N/A edgecolor ec N/A N/A cov None N/A N/A ellipse N/A covariance_ellipse cov N/A axis_equal N/A N/A N/A N/A plt axis equal N/A N/A title None N/A N/A N/A N/A plt title title N/A compute_std False N/A N/A std None N/A N/A std variance N/A compute_std True N/A N/A N/A np isscalar std N/A N/A std N/A std N/A compute_std N/A N/A std N/A N/A np sqrt N/A N/A np asarray std N/A ax N/A N/A plt gca N/A angle N/A N/A np degrees N/A ellipse N/A 0 N/A width N/A N/A ellipse N/A 1 2.0 N/A height N/A N/A ellipse N/A 2 2.0 N/A sd std N/A N/A e N/A Ellipse xy mean width N/A sd width height N/A sd height angle angle facecolor facecolor edgecolor edgecolor alpha alpha lw 2 ls ls N/A N/A N/A ax add_patch e N/A N/A x y mean N/A N/A N/A plt scatter x y marker + color edgecolor N/A N/A xlim None N/A N/A N/A N/A ax set_xlim xlim N/A N/A ylim None N/A N/A N/A N/A ax set_ylim ylim N/A show_semiaxis N/A N/A a N/A ellipse N/A 0 N/A N/A h w N/A N/A height 4 N/A width 4 N/A N/A N/A plt plot N/A x N/A x N/A h N/A cos N/A a N/A N/A np pi 2 N/A y N/A y N/A h N/A sin N/A a N/A N/A np pi 2 N/A N/A N/A plt plot N/A x N/A x N/A w N/A cos a N/A y N/A y N/A w N/A sin a N/A norm_cdf N/A N/A x_range mu var std N/A 1 None N/A N/A  computes the probability that a Gaussian distribution lies
    within a range of values.

    Parameters
    ----------

    x_range : (float, float)
        tuple of range to compute probability for

    mu : float
        mean of the Gaussian

    var : float, optional
        variance of the Gaussian. Ignored if `std` is provided

    std : float, optional
       standard deviation of the Gaussian. This overrides the `var` parameter

    Returns
    -------

    probability : float
        probability that Gaussian is within x_range. E.g. .1 means 10%.
     N/A N/A std None N/A N/A std N/A N/A math sqrt var N/A N/A abs N/A N/A N/A norm cdf N/A x_range N/A 0 loc mu scale std N/A N/A norm cdf N/A x_range N/A 1 loc mu scale std N/A _is_inside_ellipse N/A N/A x y ex ey orientation width height N/A N/A N/A co N/A N/A np cos orientation N/A so N/A N/A np sin orientation N/A xx N/A N/A x co N/A y so N/A yy N/A N/A y co N/A x so N/A N/A N/A N/A N/A xx width 2 N/A N/A yy height 2 1.0 N/A N/A N/A N/A N/A N/A N/A N/A x ex co N/A N/A y ey so 2 N/A width 2 N/A N/A N/A N/A N/A x ex so N/A N/A y ey co 2 N/A height 2 1 N/A _to_cov N/A N/A x n N/A N/A N/A  If x is a scalar, returns a covariance matrix generated from it
    as the identity matrix multiplied by x. The dimension will be nxn.
    If x is already a numpy array then it is returned unchanged.
     N/A N/A N/A N/A x shape N/A N/A N/A type x N/A np ndarray N/A N/A x N/A N/A N/A np asarray x N/A 0 N/A x N/A N/A N/A N/A N/A N/A N/A np eye n x N/A _do_plot_test N/A N/A N/A N/A numpy.random multivariate_normal N/A p N/A N/A np array N/A N/A 32 15 N/A 15.0 40.0 N/A N/A x y N/A N/A multivariate_normal mean N/A 0 0 cov p size 5000 T N/A sd 2 N/A N/A a w h N/A covariance_ellipse p sd N/A N/A print N/A N/A np degrees a w h N/A count 0 N/A color N/A N/A i N/A range N/A len x N/A N/A N/A _is_inside_ellipse N/A x N/A i N/A y N/A i 0 0 a w h N/A N/A N/A N/A color append b N/A count 1 N/A N/A N/A N/A color append r N/A N/A N/A plt scatter x y alpha 0.2 c color N/A N/A N/A plt axis equal N/A N/A plot_covariance_ellipse mean N/A 0.0 0.0 cov p std sd facecolor none N/A N/A print N/A count N/A len x N/A plot_std_vs_var N/A N/A N/A N/A N/A N/A N/A plt figure N/A x N/A 0 0 N/A P N/A N/A np array N/A N/A 3 1 N/A 1 3 N/A N/A plot_covariance_ellipse x P std N/A 1 2 3 facecolor g alpha 0.2 N/A N/A plot_covariance_ellipse x P variance N/A 1 2 3 facecolor r alpha 0.5 N/A rand_student_t N/A N/A df mu std N/A 0 1 N/A N/A return random number distributed by student's t distribution with
    `df` degrees of freedom with the specified mean and standard deviation.
     N/A x N/A N/A random gauss 0 std N/A y N/A 2.0 N/A N/A random gammavariate N/A 0.5 df 2.0 N/A N/A N/A x N/A N/A math sqrt N/A y df mu N/A NESS N/A N/A xs est_xs ps N/A N/A N/A  Computes the normalized estimated error squared test on a sequence
    of estimates. The estimates are optimal if the mean error is zero and
    the covariance matches the Kalman filter's covariance. If this holds,
    then the mean of the NESS should be equal to or less than the dimension
    of x.

    Examples
    --------

    .. code-block: Python

        xs = ground_truth()
        est_xs, ps, _, _ = kf.batch_filter(zs)
        NESS(xs, est_xs, ps)

    Parameters
    ----------

    xs : list-like
        sequence of true values for the state x

    est_xs : list-like
        sequence of estimates from an estimator (such as Kalman filter)

    ps : list-like
        sequence of covariance matrices from the estimator

    Returns
    -------

    ness : list of floats
       list of NESS computed for each estimate

     N/A est_err N/A xs est_xs N/A ness N/A N/A N/A x p N/A zip est_err ps N/A N/A N/A N/A ness append N/A N/A N/A N/A np dot N/A x T N/A N/A linalg inv p dot x N/A ness N/A N/A N/A __name__ __main__ N/A N/A ax N/A plot_gaussian_pdf 2 3 N/A N/A plot_gaussian_cdf 2 3 ax ax N/A N/A N/A plt show N/A ys N/A N/A np abs N/A N/A N/A np random randn 100 N/A ys N/A N/A np sum ys N/A N/A plot_discrete_cdf xs None ys ys N/A plot_std_vs_var()
    plt.figure()

    _do_plot_test()

    #test_gaussian()

    # test conversion of scalar to covariance matrix
    x  = multivariate_gaussian(np.array([1,1]), np.array([3,4]), np.eye(2)*1.4)
    x2 = multivariate_gaussian(np.array([1,1]), np.array([3,4]), 1.4)
    assert x == x2

    # test univarate case
    rv = norm(loc = 1., scale = np.sqrt(2.3))
    x2 = multivariate_gaussian(1.2, 1., 2.3)
    x3 = gaussian(1.2, 1., 2.3)

    assert rv.pdf(1.2) == x2
    assert abs(x2- x3) < 0.00000001

    cov = np.array([[1.0, 1.0],
                    [1.0, 1.1]])

    plt.figure()
    P = np.array([[2,0],[0,2]])
    plot_covariance_ellipse((2,7), cov=cov, variance=[1,2], facecolor='g',
                            title='my title', alpha=.2, ls='dashed')
    plt.show()

    print("all tests passed")
    