403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
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/physics/units/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/sympy/physics/units/__pycache__/quantities.cpython-310.pyc
o

�8Va��@sPdZddlmZmZmZddlmZddlmZddl	m
Z
Gdd�de�ZdS)	z
Physical quantities.
�)�
AtomicExpr�Symbol�sympify)�_QuantityMapper)�Prefix)�SymPyDeprecationWarningc@s�eZdZdZdZdZdZdZdZ			d*dd�Z	d+dd	�Z
d+d
d�Zdd
�Zdd�Z
edd��Zedd��Zedd��Zedd��Zdd�Zdd�Zdd�Zdd�Zed+d d!��Zed+d"d#��Zd$d%�Zd+d&d'�Zed(d)��ZdS),�QuantityzX
    Physical quantity: can be a unit of measure, a constant or a generic quantity.
    TFNc	Ks�t|t�s	t|�}t|t�st|t�s|||}}}|dur)tddddd���|dur7tddddd���|dur>|}n	t|t�rGt|�}t�|||�}
||
_||
_||
_	||
_
||
_||
_|duri|
�
|�|durr|
�|�|
S)Nz1.3i�7zQuantity argumentsz&unit_system.set_quantity_dimension_map��deprecated_since_version�issue�feature�
useinstead�SI_quantity_scale_factors)�
isinstancer�strr�warnr�__new__�_name�_abbrev�_latex_repr�
_unicode_repr�_ascii_repr�_mathml_repr�
set_dimension�set_scale_factor)�cls�name�abbrev�	dimension�scale_factor�
latex_repr�pretty_unicode_repr�pretty_ascii_repr�mathml_presentation_repr�assumptions�obj�r&�@/usr/lib/python3/dist-packages/sympy/physics/units/quantities.pyrsL

���


zQuantity.__new__�SIcC�@tdddd�|�d���ddlm}|�|�}|�||�dS)N�1.5�eE�!Moving method to UnitSystem classzIunit_system.set_quantity_dimension or {}.set_global_relative_scale_factorr	r��
UnitSystem)r�formatr�sympy.physics.unitsr.�get_unit_system�set_quantity_dimension)�selfr�unit_systemr.r&r&r'rJ��
zQuantity.set_dimensioncCr))Nr*r+r,zLunit_system.set_quantity_scale_factor or {}.set_global_relative_scale_factorr	rr-)rr/rr0r.r1�set_quantity_scale_factor)r3rr4r.r&r&r'rUr5zQuantity.set_scale_factorcCs|tj|<dS�N)r�_quantity_dimension_global)r3rr&r&r'�set_global_dimension`szQuantity.set_global_dimensioncCsLddlm}t|�}|�dd�dd��}t|�}||f|j|<||j|<dS)zN
        Setting a scale factor that is valid across all unit system.
        rr-cSs
t|t�Sr7)rr��xr&r&r'�<lambda>ks
z;Quantity.set_global_relative_scale_factor.<locals>.<lambda>cS�|jSr7)rr:r&r&r'r<lsN)r0r.r�replace�_quantity_scale_factors_global�,_quantity_dimensional_equivalence_map_global)r3r�reference_quantityr.r&r&r'� set_global_relative_scale_factorcs�z)Quantity.set_global_relative_scale_factorcCr=r7)r�r3r&r&r'rrsz
Quantity.namecC�ddlm}|��}|�|�S)Nrr-)r0r.�get_default_unit_system�get_quantity_dimension�r3r.r4r&r&r'rvs
zQuantity.dimensioncCr=)z
        Symbol representing the unit name.

        Prepend the abbreviation with the prefix symbol if it is defines.
        )rrCr&r&r'r|szQuantity.abbrevcCrD)zW
        Overall magnitude of the quantity as compared to the canonical units.
        rr-)r0r.rE�get_quantity_scale_factorrGr&r&r'r�s
zQuantity.scale_factorcC�dS�NTr&rCr&r&r'�_eval_is_positive��zQuantity._eval_is_positivecCrIrJr&rCr&r&r'�_eval_is_constant�rLzQuantity._eval_is_constantcCs|Sr7r&rCr&r&r'�	_eval_Abs�rLzQuantity._eval_AbscCst|t�r||kr
|SdSdSr7)rr)r3�old�newr&r&r'�
_eval_subs�s�zQuantity._eval_subscC�4tddddd���ddlm}|�|�}|�|�S)Nr*r+z{get_dimensional_expr() is now associated with UnitSystem objects. The dimensional relations depend on the unit system used.z unit_system.get_dimensional_exprr	rr-)rrr0r.r1�get_dimensional_expr��exprr4r.r&r&r'rS�s�

zQuantity.get_dimensional_exprcCrR)zCReturn tuple with scale factor expression and dimension expression.r*r+z3This method has been moved to the UnitSystem class.z)unit_system._collect_factor_and_dimensionr	rr-)rrr0r.r1�_collect_factor_and_dimensionrTr&r&r'rV�s�

z&Quantity._collect_factor_and_dimensioncCs6|jr|jSd�t|j�dkr|jd�S|jd�S)Nz\text{{{}}}��r)rr/�len�args)r3�printerr&r&r'�_latex�s��zQuantity._latexcCsddlm}||||�S)a�
        Convert the quantity to another quantity of same dimensions.

        Examples
        ========

        >>> from sympy.physics.units import speed_of_light, meter, second
        >>> speed_of_light
        speed_of_light
        >>> speed_of_light.convert_to(meter/second)
        299792458*meter/second

        >>> from sympy.physics.units import liter
        >>> liter.convert_to(meter**3)
        meter**3/1000
        rX)�
convert_to)�utilr])r3�otherr4r]r&r&r'r]�szQuantity.convert_tocCst�S)z"Return free symbols from quantity.)�setrCr&r&r'�free_symbols�szQuantity.free_symbols)NNNNNNN)r()�__name__�
__module__�__qualname__�__doc__�is_commutative�is_real�	is_number�
is_nonzero�	_diff_wrtrrrr9rB�propertyrrrrrKrMrNrQ�staticmethodrSrVr\r]rar&r&r&r'rsF
�
4





rN)re�sympyrrr�sympy.physics.units.dimensionsr�sympy.physics.units.prefixesr�sympy.utilities.exceptionsrrr&r&r&r'�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit