403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3/dist-packages/sympy/stats/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/sympy/stats/__pycache__/error_prop.cpython-310.pyc
o

�8Va"�@sndZddlmZmZddlmZmZmZmZm	Z	m
Z
mZddlm
Z
mZmZddlmZdd�Zd
d
d�ZdS)z'Tools for arithmetic error propagation.�)�repeat�combinations)�S�Symbol�Add�Mul�simplify�Pow�exp)�RandomSymbol�Variance�
Covariance)�	is_randomcCst|j�dkr|jdS|S)Nr)�len�args)�var�r�8/usr/lib/python3/dist-packages/sympy/stats/error_prop.py�<lambda>	�rrFc
Cs�|j}t|�dkr*||vrtjSt|�rt|���St|t�r'tt	|����StjSt|�}t
tt|t
||�t
||���}t|t�rZt|�}|rXdd�t|d�D�}|t|�7}|St|t�r�dd�t||�D�}t|dt|��}|r�dd�tt|d�t|d��D�}|t|�7}|St|t�r�|d}|d|||dd}	t|	�}|St|t�r�t|d|d�}|St|�}|S)a�Symbolically propagates variance (`\sigma^2`) for expressions.
    This is computed as as seen in [1]_.

    Parameters
    ==========

    expr : Expr
        A sympy expression to compute the variance for.
    consts : sequence of Symbols, optional
        Represents symbols that are known constants in the expr,
        and thus have zero variance. All symbols not in consts are
        assumed to be variant.
    include_covar : bool, optional
        Flag for whether or not to include covariances, default=False.

    Returns
    =======

    var_expr : Expr
        An expression for the total variance of the expr.
        The variance for the original symbols (e.g. x) are represented
        via instance of the Variance symbol (e.g. Variance(x)).

    Examples
    ========

    >>> from sympy import symbols, exp
    >>> from sympy.stats.error_prop import variance_prop
    >>> x, y = symbols('x y')

    >>> variance_prop(x + y)
    Variance(x) + Variance(y)

    >>> variance_prop(x * y)
    x**2*Variance(y) + y**2*Variance(x)

    >>> variance_prop(exp(2*x))
    4*exp(4*x)*Variance(x)

    References
    ==========

    .. [1] https://en.wikipedia.org/wiki/Propagation_of_uncertainty

    rcSs*g|]\}}dtt|�t|�����qS���r
�_arg0_or_var�expand)�.0�x�yrrr�
<listcomp>Js�z!variance_prop.<locals>.<listcomp>rcSsg|]
\}}||d�qSrr)r�a�vrrrrNrcSs:g|]\\}}\}}dtt|�t|����||�qSrr)rr�brrrrrrQs&��)rrr�Zerorr�doit�
isinstancerr�list�map�
variance_proprrrr�ziprr	r
)
�expr�consts�
include_covarr�nargs�var_args�var_expr�termsr!r rrrr(sT.
�
�
�
��

�
��r(N)rF)�__doc__�	itertoolsrr�sympyrrrrrr	r
� sympy.stats.symbolic_probabilityrrr
�sympy.stats.rvrrr(rrrr�<module>s$

Youez - 2016 - github.com/yon3zu
LinuXploit