403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/numpy/polynomial/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/numpy/polynomial/tests/__pycache__/test_printing.cpython-311.pyc
�

���c-P��n�ddlmZmZddlZddlmZmZmZddlm	Z
ddlmZm
Z
ddlmZddlmZGd�d��ZGd	�d
��ZGd�d��Zd
�Zd�Zej�deedd��edd��ge���dfeddedd��ge���dfeed��ed��dge���dff��d���Zej�degd�e���dfeddddgge���dff��d ���ZGd!�d"��Zej�d#e
jd$fe
jd%fe
jd&fe
j d'fe
j!d(fe
j"d)ff��d*���Z#Gd+�d,��Z$Gd-�d.��Z%d/Z&Gd0�d1��Z'dS)2�)�nan�infN)�array�arange�printoptions)�assert_equal�assert_)�Fraction)�Decimalc��eZdZejdd���d���Zej�dgd�dfgd�d	fed
��dff��d���Z	ej�dgd�d
fgd�dfed
��dff��d���Z
ej�dgd�dfgd�dfed
��dff��d���Zej�dgd�dfgd�dfed
��dff��d���Zej�dgd�dfgd�dfed
��dff��d���Z
ej�dgd�dfgd�dfed
��dff��d ���Zd!S)"�TestStrUnicodeSuperSubscripts�classT��scope�autousec�.�tjd��dS�N�unicode��poly�set_default_printstyle��selfs �F/usr/lib/python3/dist-packages/numpy/polynomial/tests/test_printing.py�use_unicodez)TestStrUnicodeSuperSubscripts.use_unicodes���#�I�.�.�.�.�.���inp�tgt�����1.0 + 2.0·x + 3.0·x²����rr#r&u#-1.0 + 0.0·x + 3.0·x² - 1.0·x³�u�0.0 + 1.0·x + 2.0·x² + 3.0·x³ + 4.0·x⁴ + 5.0·x⁵ + 6.0·x⁶ + 7.0·x⁷ +
8.0·x⁸ + 9.0·x⁹ + 10.0·x¹⁰ + 11.0·x¹¹c�h�ttj|����}t||��dS�N��strr�
Polynomialr�rrr�ress    r�test_polynomial_strz1TestStrUnicodeSuperSubscripts.test_polynomial_str�1���$�/�#�&�&�'�'���S�#�����r�!1.0 + 2.0·T₁(x) + 3.0·T₂(x)u1-1.0 + 0.0·T₁(x) + 3.0·T₂(x) - 1.0·T₃(x)u�0.0 + 1.0·T₁(x) + 2.0·T₂(x) + 3.0·T₃(x) + 4.0·T₄(x) + 5.0·T₅(x) +
6.0·T₆(x) + 7.0·T₇(x) + 8.0·T₈(x) + 9.0·T₉(x) + 10.0·T₁₀(x) + 11.0·T₁₁(x)c�h�ttj|����}t||��dSr)�r+r�	Chebyshevrr-s    r�test_chebyshev_strz0TestStrUnicodeSuperSubscripts.test_chebyshev_strs1���$�.��%�%�&�&���S�#�����ru!1.0 + 2.0·P₁(x) + 3.0·P₂(x)u1-1.0 + 0.0·P₁(x) + 3.0·P₂(x) - 1.0·P₃(x)u�0.0 + 1.0·P₁(x) + 2.0·P₂(x) + 3.0·P₃(x) + 4.0·P₄(x) + 5.0·P₅(x) +
6.0·P₆(x) + 7.0·P₇(x) + 8.0·P₈(x) + 9.0·P₉(x) + 10.0·P₁₀(x) + 11.0·P₁₁(x)c�h�ttj|����}t||��dSr)�r+r�Legendrerr-s    r�test_legendre_strz/TestStrUnicodeSuperSubscripts.test_legendre_str(�1���$�-��$�$�%�%���S�#�����ru!1.0 + 2.0·H₁(x) + 3.0·H₂(x)u1-1.0 + 0.0·H₁(x) + 3.0·H₂(x) - 1.0·H₃(x)u�0.0 + 1.0·H₁(x) + 2.0·H₂(x) + 3.0·H₃(x) + 4.0·H₄(x) + 5.0·H₅(x) +
6.0·H₆(x) + 7.0·H₇(x) + 8.0·H₈(x) + 9.0·H₉(x) + 10.0·H₁₀(x) + 11.0·H₁₁(x)c�h�ttj|����}t||��dSr)�r+r�Hermiterr-s    r�test_hermite_strz.TestStrUnicodeSuperSubscripts.test_hermite_str3s1���$�,�s�#�#�$�$���S�#�����ru#1.0 + 2.0·He₁(x) + 3.0·He₂(x)u4-1.0 + 0.0·He₁(x) + 3.0·He₂(x) - 1.0·He₃(x)u�0.0 + 1.0·He₁(x) + 2.0·He₂(x) + 3.0·He₃(x) + 4.0·He₄(x) + 5.0·He₅(x) +
6.0·He₆(x) + 7.0·He₇(x) + 8.0·He₈(x) + 9.0·He₉(x) + 10.0·He₁₀(x) +
11.0·He₁₁(x)c�h�ttj|����}t||��dSr)�r+r�HermiteErr-s    r�test_hermiteE_strz/TestStrUnicodeSuperSubscripts.test_hermiteE_str>�1���$�-��$�$�%�%���S�#�����ru!1.0 + 2.0·L₁(x) + 3.0·L₂(x)u1-1.0 + 0.0·L₁(x) + 3.0·L₂(x) - 1.0·L₃(x)u�0.0 + 1.0·L₁(x) + 2.0·L₂(x) + 3.0·L₃(x) + 4.0·L₄(x) + 5.0·L₅(x) +
6.0·L₆(x) + 7.0·L₇(x) + 8.0·L₈(x) + 9.0·L₉(x) + 10.0·L₁₀(x) + 11.0·L₁₁(x)c�h�ttj|����}t||��dSr)�r+r�Laguerrerr-s    r�test_laguerre_strz/TestStrUnicodeSuperSubscripts.test_laguerre_strJr:rN)�__name__�
__module__�__qualname__�pytest�fixturer�mark�parametrizerr/r5r9r>rBrG�rrr
r
s��������V�^�'�4�0�0�0�/�/�1�0�/��[���^�	���-�.�	���>�?�	�����$�	&�.���������[���^�	���7�8�	���L�M�	�����K�	M�.���������[���^�	���7�8�	���L�M�	�����K�	M�.���������[���^�	���7�8�	���L�M�	�����K�	M�.���������[���^�	���9�:�	���O�P�	�����*�	,�.���������[���^�	���7�8�	���L�M�	�����K�	M�.���������rr
c��eZdZejdd���d���Zej�dgd�dfgd�d	fed
��dff��d���Z	ej�dgd�d
fgd�dfed
��dff��d���Z
ej�dgd�dfgd�dfed
��dff��d���Zej�dgd�dfgd�dfed
��dff��d���Zej�dgd�dfgd�dfed
��dff��d���Z
ej�dgd�dfgd�dfed
��dff��d ���Zd!S)"�TestStrAsciirTrc�.�tjd��dS�N�asciirrs r�	use_asciizTestStrAscii.use_asciiX����#�G�,�,�,�,�,rrr �1.0 + 2.0 x + 3.0 x**2r%z"-1.0 + 0.0 x + 3.0 x**2 - 1.0 x**3r'z}0.0 + 1.0 x + 2.0 x**2 + 3.0 x**3 + 4.0 x**4 + 5.0 x**5 + 6.0 x**6 +
7.0 x**7 + 8.0 x**8 + 9.0 x**9 + 10.0 x**10 + 11.0 x**11c�h�ttj|����}t||��dSr)r*r-s    rr/z TestStrAscii.test_polynomial_str\r0r�1.0 + 2.0 T_1(x) + 3.0 T_2(x)z+-1.0 + 0.0 T_1(x) + 3.0 T_2(x) - 1.0 T_3(x)z�0.0 + 1.0 T_1(x) + 2.0 T_2(x) + 3.0 T_3(x) + 4.0 T_4(x) + 5.0 T_5(x) +
6.0 T_6(x) + 7.0 T_7(x) + 8.0 T_8(x) + 9.0 T_9(x) + 10.0 T_10(x) +
11.0 T_11(x)c�h�ttj|����}t||��dSr)r3r-s    rr5zTestStrAscii.test_chebyshev_strgs1���$�.��%�%�&�&���S�#�����rz1.0 + 2.0 P_1(x) + 3.0 P_2(x)z+-1.0 + 0.0 P_1(x) + 3.0 P_2(x) - 1.0 P_3(x)z�0.0 + 1.0 P_1(x) + 2.0 P_2(x) + 3.0 P_3(x) + 4.0 P_4(x) + 5.0 P_5(x) +
6.0 P_6(x) + 7.0 P_7(x) + 8.0 P_8(x) + 9.0 P_9(x) + 10.0 P_10(x) +
11.0 P_11(x)c�h�ttj|����}t||��dSr)r7r-s    rr9zTestStrAscii.test_legendre_strsrCrz1.0 + 2.0 H_1(x) + 3.0 H_2(x)z+-1.0 + 0.0 H_1(x) + 3.0 H_2(x) - 1.0 H_3(x)z�0.0 + 1.0 H_1(x) + 2.0 H_2(x) + 3.0 H_3(x) + 4.0 H_4(x) + 5.0 H_5(x) +
6.0 H_6(x) + 7.0 H_7(x) + 8.0 H_8(x) + 9.0 H_9(x) + 10.0 H_10(x) +
11.0 H_11(x)c�h�ttj|����}t||��dSr)r<r-s    rr>zTestStrAscii.test_hermite_strs1���$�,�s�#�#�$�$���S�#�����rz1.0 + 2.0 He_1(x) + 3.0 He_2(x)z.-1.0 + 0.0 He_1(x) + 3.0 He_2(x) - 1.0 He_3(x)z�0.0 + 1.0 He_1(x) + 2.0 He_2(x) + 3.0 He_3(x) + 4.0 He_4(x) +
5.0 He_5(x) + 6.0 He_6(x) + 7.0 He_7(x) + 8.0 He_8(x) + 9.0 He_9(x) +
10.0 He_10(x) + 11.0 He_11(x)c�h�ttj|����}t||��dSr)r@r-s    rrBzTestStrAscii.test_hermiteE_str�rCrz1.0 + 2.0 L_1(x) + 3.0 L_2(x)z+-1.0 + 0.0 L_1(x) + 3.0 L_2(x) - 1.0 L_3(x)z�0.0 + 1.0 L_1(x) + 2.0 L_2(x) + 3.0 L_3(x) + 4.0 L_4(x) + 5.0 L_5(x) +
6.0 L_6(x) + 7.0 L_7(x) + 8.0 L_8(x) + 9.0 L_9(x) + 10.0 L_10(x) +
11.0 L_11(x)c�h�ttj|����}t||��dSr)rEr-s    rrGzTestStrAscii.test_laguerre_str�rCrN)rHrIrJrKrLrUrMrNrr/r5r9r>rBrGrOrrrQrQVs��������V�^�'�4�0�0�0�-�-�1�0�-��[���^�	���,�-�	���=�>�	�����;�	=�.���������[���^�	���3�4�	���F�G�	�����%�	'�.���������[���^�	���3�4�	���F�G�	�����%�	'�.���������[���^�	���3�4�	���F�G�	�����%�	'�.���������[���^�	���5�6�	���I�J�	�����6�	8�.���������[���^�	���3�4�	���F�G�	�����%�	'�.���������rrQc��eZdZejdd���d���Zd�Zd�Zd�Zd�Z	ej
�d	d
��d���ZdS)
�TestLinebreakingrTrc�.�tjd��dSrSrrs rrUzTestLinebreaking.use_ascii�rVrc��tjgd���}ttt	|����d��tt	|��d��dS)N)�Na�rcrcrc�{�JzJ12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 + 123.0 x**4�rr,r�lenr+�r�ps  r�test_single_line_one_lessz*TestLinebreaking.test_single_line_one_less�s]���O�I�I�I�J�J���S��Q���[�[�"�%�%�%��S��V�V�
+�	�	�	�	�	rc��tjgd���}ttt	|����d��tt	|��d��dS)N)rcrcrcrci��KzK12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 +
1234.0 x**4rfrhs  r�test_num_chars_is_linewidthz,TestLinebreaking.test_num_chars_is_linewidth�s]���O�J�J�J�K�K���S��Q���[�[�"�%�%�%��S��V�V�
-�	�	�	�	�	rc���tjgd���}ttt	|���d��d��d��tt	|��d��dS)N)rcrcrcrcr!rc�
rrezZ12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 + 1.0 x**4 +
12345678.0 x**5)rr,rrgr+�splitrhs  r�6test_first_linebreak_multiline_one_less_than_linewidthzGTestLinebreaking.test_first_linebreak_multiline_one_less_than_linewidth�sv���O�E�E�E�
�
��	�S��Q�����d�+�+�A�.�/�/��4�4�4��S��V�V�
<�	�	�	�	�	rc�l�tjgd���}tt|��d��dS)N)rcrcrcg=
��)�gAr!rcz[12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.12 x**3 +
1.0 x**4 + 12345678.0 x**5)rr,rr+rhs  r�+test_first_linebreak_multiline_on_linewidthz<TestLinebreaking.test_first_linebreak_multiline_on_linewidth�sG���O�H�H�H�
�
��	�S��V�V�
=�	�	�	�	�	r)�lwr))rlz�0.0 + 10.0 x + 200.0 x**2 + 3000.0 x**3 + 40000.0 x**4 + 500000.0 x**5 +
600000.0 x**6 + 70000.0 x**7 + 8000.0 x**8 + 900.0 x**9)�-z�0.0 + 10.0 x + 200.0 x**2 + 3000.0 x**3 +
40000.0 x**4 + 500000.0 x**5 +
600000.0 x**6 + 70000.0 x**7 + 8000.0 x**8 +
900.0 x**9)�z�0.0 + 10.0 x + 200.0 x**2 + 3000.0 x**3 + 40000.0 x**4 + 500000.0 x**5 + 600000.0 x**6 + 70000.0 x**7 + 8000.0 x**8 + 900.0 x**9c�J�tjgd���}t|���5tt	|��|��t	|���d��D]"}t
t|��|k���#	ddd��dS#1swxYwYdS)N)
r�
��i�i@�i �i�'	ipi@i�)�	linewidthro)rr,rrr+rpr	rg)rrtrri�lines     r�test_linewidth_printoptionz+TestLinebreaking.test_linewidth_printoption�s���
�O�G�G�G�
�
���B�
'�
'�
'�	(�	(���Q����%�%�%��A�����T�*�*�
(�
(����D�	�	�B��'�'�'�'�
(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�	(�	(s�A#B�B�BN)
rHrIrJrKrLrUrjrmrqrsrMrNr|rOrrr`r`�s��������V�^�'�4�0�0�0�-�-�1�0�-�������	�	�	�����[���]�
-�
�
�(�(�
�
�(�(�(rr`c�"�tjgd���}tjgd���}tjd��t	t|��d��t	t|��d��tjd��t	t|��d��t	t|��d��t
jt��5tjd��ddd��dS#1swxYwYdS)	Nr rTrWrYrr$r1�
invalid_input)	rr,r4rrr+rK�raises�
ValueError)ri�cs  r�test_set_default_printoptionsr��s+����	�	�	�"�"�A���y�y�y�!�!�A����(�(�(���Q���1�2�2�2���Q���8�9�9�9���	�*�*�*���Q���2�3�3�3���Q���<�=�=�=�	��z�	"�	"�5�5��#�O�4�4�4�5�5�5�5�5�5�5�5�5�5�5�5����5�5�5�5�5�5s�"D�D�Dc��gd�}tj|��}tjt|t�����}tjd��tt
|��d��tt
|��d��tjd��tt
|��d��tt
|��d��d	S)
z%Test both numpy and built-in complex.)y�?y�?�?y�@y@��dtyperu*1j + (1+1j)·x - (2-2j)·x² + (3+0j)·x³u+1j + (1+1j)·x + (-2+2j)·x² + (3+0j)·x³rTz)1j + (1+1j) x - (2-2j) x**2 + (3+0j) x**3z*1j + (1+1j) x + (-2+2j) x**2 + (3+0j) x**3N)rr,r�objectrrr+)�coefs�p1�p2s   r�test_complex_coefficientsr��s���%�%�%�E�	
���	�	�B�	
���u�F�3�3�3�	4�	4�B���	�*�*�*���R���F�G�G�G���R���G�H�H�H����(�(�(���R���E�F�F�F���R���F�G�G�G�G�Gr)r�rr!r"r#�r�u1/2 + 3/4·x��u1 + 2·x + 5/7·x²z1.00z2.2u1.00 + 2.2·x + 3·x²c��tj|��}tjd��tt	|��|��dSr�rr,rrr+�r�rris   r� test_numeric_object_coefficientsr�s@��	
�����A���	�*�*�*���Q��������r)r!r"�fu1 + 2·x + f·x²u1 + 2·x + [3, 4]·x²c��tj|��}tjd��tt	|��|��dS)zK
    Test coef fallback for object arrays of non-numeric coefficients.
    rNr�r�s   r�#test_nonnumeric_object_coefficientsr�s@��	
�����A���	�*�*�*���Q��������rc�&�eZdZd�Zd�Zd�Zd�ZdS)�
TestFormatc��tjd��tjgd���}tt	|d��d��dS)NrT�r!r"rr&ru"1.0 + 2.0·x + 0.0·x² - 1.0·x³�rrr,r�formatrhs  r�test_format_unicodezTestFormat.test_format_unicode!sG���#�G�,�,�,��O�M�M�M�*�*���V�A�y�)�)�+O�P�P�P�P�Prc��tjd��tjgd���}tt	|d��d��dS)Nrr�rTz!1.0 + 2.0 x + 0.0 x**2 - 1.0 x**3r�rhs  r�test_format_asciizTestFormat.test_format_ascii&sR���#�I�.�.�.��O�M�M�M�*�*����1�g��� C�	
�	
�	
�	
�	
rc��tjd��tjgd���}tt	|��d��t|�d��dS)NrTr rWr�rhs  r�test_empty_formatstrzTestFormat.test_empty_formatstr-sV���#�G�,�,�,��O�I�I�I�&�&���V�A�Y�Y� 8�9�9�9���V�5�6�6�6�6�6rc��tjgd���}tjt��5t|d��ddd��dS#1swxYwYdS)Nr�z.2f)rr,rKrr�r�rhs  r�test_bad_formatstrzTestFormat.test_bad_formatstr3s����O�M�M�M�*�*��
�]�:�
&�
&�	�	��1�e����	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A�A�AN)rHrIrJr�r�r�r�rOrrr�r� sS������Q�Q�Q�

�
�
�7�7�7�����rr�)rru1.0 + 2.0·z + 3.0·z²u!1.0 + 2.0·T₁(z) + 3.0·T₂(z)u!1.0 + 2.0·H₁(z) + 3.0·H₂(z)u#1.0 + 2.0·He₁(z) + 3.0·He₂(z)u!1.0 + 2.0·L₁(z) + 3.0·L₂(z)u!1.0 + 2.0·P₁(z) + 3.0·P₂(z)c�H�|gd�d���}t|d�|��dS)Nr �z��symbolr)r)rrris   r�test_symbolr�9s6��	
��Y�Y�Y�s�#�#�#�A��A����%�%�%�%�%rc�2�eZdZd�Zd�Zd�Zd�Zd�Zd�ZdS)�TestReprc�p�ttjddg����}d}t||��dS)Nrr!zBPolynomial([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))�reprrr,r�rr.rs   rr/zTestRepr.test_polynomial_strGs?���4�?�A�q�6�*�*�+�+��
�	�	�S�#�����rc�p�ttjddg����}d}t||��dS)Nrr!zAChebyshev([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))r�rr4rr�s   rr5zTestRepr.test_chebyshev_strOs?���4�>�1�a�&�)�)�*�*��
�	�	�S�#�����rc�p�ttjddg����}d}t||��dS)Nrr!z@Legendre([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))r�rr8rr�s   r�test_legendre_reprzTestRepr.test_legendre_reprW�?���4�=�!�Q��(�(�)�)��
�	�	�S�#�����rc�p�ttjddg����}d}t||��dS)Nrr!z?Hermite([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))r�rr=rr�s   r�test_hermite_reprzTestRepr.test_hermite_repr_s?���4�<��A��'�'�(�(��
�	�	�S�#�����rc�p�ttjddg����}d}t||��dS)Nrr!z@HermiteE([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))r�rrArr�s   r�test_hermiteE_reprzTestRepr.test_hermiteE_reprgr�rc�p�ttjddg����}d}t||��dS)Nrr!z<Laguerre([0., 1.], domain=[0, 1], window=[0, 1], symbol='x'))r�rrFrr�s   r�test_laguerre_reprzTestRepr.test_laguerre_repror�rN)	rHrIrJr/r5r�r�r�r�rOrrr�r�Fsn�������������������������rr�c�0�eZdZdZd�Zd�Zd�Zd�Zd�ZdS)�
TestLatexReprz#Test the latex repr used by Jupyterc�P�dd�|_	|���|`S#|`wxYw)NFc� �t|��Sr))r+)�x�parenss  r�<lambda>z(TestLatexRepr.as_latex.<locals>.<lambda>s���Q���r)F)�_repr_latex_scalar�_repr_latex_)r�objs  r�as_latexzTestLatexRepr.as_latex{sB��"@�!?�!?���	'��#�#�%�%��&�&���&�&�&�&�&s�!�%c���tjgd���}t|�|��d��tjgd�ddg���}t|�|��d��tjgd�ddg���}t|�|��d	��tjgd�d
dg���}t|�|��d��dS)Nr z%$x \mapsto 1.0 + 2.0\,x + 3.0\,x^{2}$���r��domainzK$x \mapsto 1.0 + 2.0\,\left(1.0 + x\right) + 3.0\,\left(1.0 + x\right)^{2}$����?zE$x \mapsto 1.0 + 2.0\,\left(2.0x\right) + 3.0\,\left(2.0x\right)^{2}$r&zQ$x \mapsto 1.0 + 2.0\,\left(1.0 + 2.0x\right) + 3.0\,\left(1.0 + 2.0x\right)^{2}$�rr,rr�rhs  r�test_simple_polynomialz$TestLatexRepr.test_simple_polynomial�s���O�I�I�I�&�&���T�]�]�1�%�%�4�	6�	6�	6�
�O�I�I�I�r�1�g�6�6�6���T�]�]�1�%�%�Z�	\�	\�	\�
�O�I�I�I�t�S�k�:�:�:���T�]�]�1�%�%�T�	V�	V�	V�
�O�I�I�I�r�1�g�6�6�6���T�]�]�1�%�%�`�	b�	b�	b�	b�	brc���tjgd���}t|�|��d��tjgd�ddg���}t|�|��d��dS)Nr z?$x \mapsto 1.0\,{T}_{0}(x) + 2.0\,{T}_{1}(x) + 3.0\,{T}_{2}(x)$r&rr�zZ$x \mapsto 1.0\,{T}_{0}(1.0 + 2.0x) + 2.0\,{T}_{1}(1.0 + 2.0x) + 3.0\,{T}_{2}(1.0 + 2.0x)$)rr4rr�rhs  r�test_basis_funczTestLatexRepr.test_basis_func�s����N�9�9�9�%�%���T�]�]�1�%�%�N�	P�	P�	P�
�N�9�9�9�b�!�W�5�5�5���T�]�]�1�%�%�i�	k�	k�	k�	k�	krc�x�tjgd���}t|�|��d��dS)Nr zB$x \mapsto 1.0\,{He}_{0}(x) + 2.0\,{He}_{1}(x) + 3.0\,{He}_{2}(x)$)rrArr�rhs  r�test_multichar_basis_funcz'TestLatexRepr.test_multichar_basis_func�sG���M�)�)�)�$�$���T�]�]�1�%�%�Q�	S�	S�	S�	S�	Src���tjgd�d���}t|�|��d��tjgd�ddgd���}t|�|��d��tjgd�d	d
gd���}t|�|��d��tjgd�ddgd���}t|�|��d
��dS)Nr r�r�z%$z \mapsto 1.0 + 2.0\,z + 3.0\,z^{2}$r�r)r�r�zK$z \mapsto 1.0 + 2.0\,\left(1.0 + z\right) + 3.0\,\left(1.0 + z\right)^{2}$r�r�zE$z \mapsto 1.0 + 2.0\,\left(2.0z\right) + 3.0\,\left(2.0z\right)^{2}$r&zQ$z \mapsto 1.0 + 2.0\,\left(1.0 + 2.0z\right) + 3.0\,\left(1.0 + 2.0z\right)^{2}$r�rhs  r�test_symbol_basiczTestLatexRepr.test_symbol_basic�s���O�I�I�I�c�2�2�2���T�]�]�1�%�%�4�	6�	6�	6�
�O�I�I�I�r�1�g�c�B�B�B����M�M�!���-�	
�	
�	
�
�O�I�I�I�t�S�k�#�F�F�F����M�M�!���*�	
�	
�	
�
�O�I�I�I�r�1�g�c�B�B�B����M�M�!���0�	
�	
�	
�	
�	
rN)	rHrIrJ�__doc__r�r�r�r�r�rOrrr�r�xsn������-�-�'�'�'�b�b�b�*k�k�k�S�S�S�
"
�"
�"
�"
�"
rr�)z"1.0 + (1.0e-01) x + (1.0e-02) x**2z"1.2 + (1.2e-01) x + (1.2e-02) x**2z11.23 + 0.12 x + (1.23e-02) x**2 + (1.23e-03) x**3z51.235 + 0.123 x + (1.235e-02) x**2 + (1.235e-03) x**3zG1.2346 + 0.1235 x + 0.0123 x**2 + (1.2346e-03) x**3 + (1.2346e-04) x**4zL1.23457 + 0.12346 x + 0.01235 x**2 + (1.23457e-03) x**3 + (1.23457e-04) x**4za1.234568 + 0.123457 x + 0.012346 x**2 + 0.001235 x**3 + (1.234568e-04) x**4 + (1.234568e-05) x**5zg1.2345679 + 0.1234568 x + 0.0123457 x**2 + 0.0012346 x**3 + (1.2345679e-04) x**4 + (1.2345679e-05) x**5c�f�eZdZdZejdd���d���Zd�Zd�Zd�Z	d	�Z
d
�ZdS)�TestPrintOptionsz�
    Test the output is properly configured via printoptions.
    The exponential notation is enabled automatically when the values 
    are too small or too large.
    rTrc�.�tjd��dSrSrrs rrUzTestPrintOptions.use_ascii�rVrc��tjgd���}tt|��d��t	d���5tt|��d��ddd��dS#1swxYwYdS)N�r�g�$I�$I�?gI�$Ir?kAgm۶m��AzC0.5 + 0.14285714 x + 14285714.28571429 x**2 + (1.42857143e+08) x**3r#��	precisionz40.5 + 0.143 x + 14285714.286 x**2 + (1.429e+08) x**3�rr,rr+rrhs  r�test_strzTestPrintOptions.test_str�s����O�<�<�<�=�=���S��V�V�7�	8�	8�	8��A�
&�
&�
&�	7�	7���Q���"6�
7�
7�
7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�	7�	7s�A/�/A3�6A3c��tjgd���}t|���d��t	d���5t|���d��ddd��dS#1swxYwYdS)Nr�zp$x \mapsto \text{0.5} + \text{0.14285714}\,x + \text{14285714.28571429}\,x^{2} + \text{(1.42857143e+08)}\,x^{3}$r#r�za$x \mapsto \text{0.5} + \text{0.143}\,x + \text{14285714.286}\,x^{2} + \text{(1.429e+08)}\,x^{3}$)rr,rr�rrhs  r�
test_latexzTestPrintOptions.test_latex�s����O�<�<�<�=�=���Q�^�^�%�%�
/�	0�	0�	0�
�A�
&�
&�
&�	L�	L�����)�)�K�
L�
L�
L�	L�	L�	L�	L�	L�	L�	L�	L�	L�	L�	L�	L����	L�	L�	L�	L�	L�	Ls�	#A9�9A=�A=c��tjdg��}tt|��d��t	d���5tt|��d��ddd��n#1swxYwYt	dd���5tt|��d��ddd��dS#1swxYwYdS)	Nr�z0.5�fixed)�	floatmodez
0.50000000r�)r�r�z0.5000r�rhs  r�
test_fixedzTestPrintOptions.test_fixed�s4���O�S�E�"�"���S��V�V�U�#�#�#�
�G�
,�
,�
,�	/�	/���Q����.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/��G�q�
9�
9�
9�	+�	+���Q����*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�	+�	+s$�A-�-A1�4A1�	B4�4B8�;B8c	�@�tt��D]�\}}t|���5tjd�t|dzdz��D����}t
|���dd��|ksJ�	ddd��n#1swxYwY��dS)Nr�c� �g|]}dd|zz��S)gރB��?rxrO)�.0�is  r�
<listcomp>z7TestPrintOptions.test_switch_to_exp.<locals>.<listcomp>s3��%=�%=�%=�)*�&0��Q�B��%6�%=�%=�%=rr"r#ro� )�	enumerate�
SWITCH_TO_EXPrrr,�ranger+�replace)rr��sris    r�test_switch_to_expz#TestPrintOptions.test_switch_to_exps����m�,�,�	6�	6�D�A�q���*�*�*�
6�
6��O�%=�%=�.3�A�q�D��F�m�m�%=�%=�%=�>�>���1�v�v�~�~�d�C�0�0�A�5�5�5�5�5�
6�
6�
6�
6�
6�
6�
6�
6�
6�
6�
6����
6�
6�
6�
6��	6�	6s�AB�B	�B	c�X�tjttg��}t	|��dksJ�|���dksJ�t
dd���5t	|��dksJ�|���dksJ�	ddd��dS#1swxYwYdS)Nznan + inf xz&$x \mapsto \text{nan} + \text{inf}\,x$�NAN�INF)�nanstr�infstrzNAN + INF xz&$x \mapsto \text{NAN} + \text{INF}\,x$)rr,rrr+r�rrhs  r�test_non_finitez TestPrintOptions.test_non_finites����O�S�#�J�'�'���1�v�v��&�&�&�&��~�~���#L�L�L�L�L�
��u�
5�
5�
5�	:�	:��q�6�6�]�*�*�*�*��>�>�#�#�9�:�:�:�:�:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:����	:�	:�	:�	:�	:�	:s�!0B�B#�&B#N)rHrIrJr�rKrLrUr�r�r�r�r�rOrrr�r��s����������V�^�'�4�0�0�0�-�-�1�0�-�7�7�7�
L�
L�
L�+�+�+�6�6�6�:�:�:�:�:rr�)(�mathrrrK�
numpy.corerrr�numpy.polynomial�
polynomialr�
numpy.testingrr	�	fractionsr
�decimalrr
rQr`r�r�rMrNr�r�r�r�r,r4r=rArFr8r�r�r�r�r�rOrr�<module>r�s�����������
�
�
�
�2�2�2�2�2�2�2�2�2�2�������/�/�/�/�/�/�/�/�������������G�G�G�G�G�G�G�G�TK�K�K�K�K�K�K�K�\?(�?(�?(�?(�?(�?(�?(�?(�D
5�
5�
5�H�H�H�����)�
�U�H�H�Q��N�N�H�H�Q��N�N�+�6�:�:�:����U�A�q�(�(�1�a�.�.�!��0�0�0����U�G�G�F�O�O�W�W�U�^�^�Q�/�v�>�>�>� ��
,�
�
���
�
������)�
�U�;�;�;�f�%�%�%�':�;�
�U�A�q�1�a�&�>��(�(�(�*B�C�,�����	�����������2�����	�_�/�0�	�^�8�9�	�\�6�7�	�]�9�:�	�]�7�8�	�]�7�8�
+���&�&���&�
/�/�/�/�/�/�/�/�dR
�R
�R
�R
�R
�R
�R
�R
�j3�
�8:�8:�8:�8:�8:�8:�8:�8:�8:�8:r

Youez - 2016 - github.com/yon3zu
LinuXploit