+
    eiS  c                   s8   ^ RI Ht ^ RIHt ^ RIHtHt ^ RIt^ RIH	t
 ^ RIHtHtHt ^ RIHtHt  ! R R4      t ! R	 R
4      t ! R R4      tR tR t]P.                  P1                  R(]! ]! ^^4      ]! ^^4      .]R7      R3]! ^^]! ^^4      .]R7      R3]! ]! R4      ]! R4      ^.]R7      R334      R 4       t]P.                  P1                  R(]! . R)O]R7      R3]! ^^^^..]R7      R334      R 4       t ! R R4      t]P.                  P1                  R*]
P:                  R3]
P<                  R3]
P>                  R3]
P@                  R3]
PB                  R3]
PD                  R 334      R! 4       t# ! R" R#4      t$ ! R$ R%4      t%R+t& ! R& R'4      t'R# ),    )Decimal)Fraction)infnanN)arangearrayprintoptions)assert_assert_equalc                   s  a  ] tR t^t o ]P
                  ! RRR7      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t
]P                  P                  R . R!OR	3. R"OR
3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       tR tRtV tR# )#TestStrUnicodeSuperSubscriptsclassTZscopeZautousec                2    \         P                  ! R 4       R# unicodeNpolyset_default_printstyleself   &K/usr/lib64/python3.14/site-packages/numpy/polynomial/tests/test_printing.pyuse_unicodeZ)TestStrUnicodeSuperSubscripts.use_unicode   s    ##I.       1.0 + 2.0·x + 3.0·x²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                s^    \         P                  ! V4      p\        V4      p\        WB4       R # N)r   
Polynomialstrr	   )r   inptgtpres   &&&  r   test_polynomial_strZ1TestStrUnicodeSuperSubscripts.test_polynomial_str   s#     OOC !f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                Z    \        \        P                  ! V4      4      p\        W24       R # r   r   r   	Chebyshevr	   r   r   r   r       &&& r   test_chebyshev_strZ0TestStrUnicodeSuperSubscripts.test_chebyshev_str    s     $..%&Sr   u!   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                r$   r   r   r   Legendrer	   r'   r(   r   test_legendre_strZ/TestStrUnicodeSuperSubscripts.test_legendre_str+        $--$%Sr   u!   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                r$   r   r   r   Hermiter	   r'   r(   r   test_hermite_strZ.TestStrUnicodeSuperSubscripts.test_hermite_str6   s     $,,s#$Sr   u#   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                r$   r   r   r   HermiteEr	   r'   r(   r   test_hermiteE_strZ/TestStrUnicodeSuperSubscripts.test_hermiteE_strA        $--$%Sr   u!   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                r$   r   r   r   Laguerrer	   r'   r(   r   test_laguerre_strZ/TestStrUnicodeSuperSubscripts.test_laguerre_strM   r-   r   c                    \        \        P                  ! ^ ^.4      4      pRp\        W4       \        \        P                  ! ^ ^.^^.R7      4      pRp\        W4       R# )r    u   0.0 + 1.0·xdomainu   0.0 + 1.0·(-3.0 + 2.0x)Nr   r   r   r	   r   r    r      &  r   test_polynomial_str_domainsZ9TestStrUnicodeSuperSubscripts.test_polynomial_str_domainsX   sP    $//1a&)*S$//1a&!Q89(Sr    Nr   r            r    rD   rF   )__name__
__module____qualname____firstlineno__pytestfixturer   markparametrizer   r"   r)   r,   r0   r3   r7   r>   __static_attributes____classdictcell__Z__classdict__   @r   r
   r
      s    ^^'40/ 1/ [[^	-.	>?	 $ 	&. 
 [[^	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.  r   r
   c                   s  a  ] tR t^at o ]P
                  ! RRR7      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t
]P                  P                  R . R!OR	3. R"OR
3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       t]P                  P                  R . R!OR3. R"OR3]	! ^4      R334      R 4       tR tRtV tR# )#TestStrAsciir   Tr   c                r   asciiNr   r   r   r   	use_asciiZTestStrAscii.use_asciic       ##G,r   1.0 + 2.0 x + 3.0 x**2z"-1.0 + 0.0 x + 3.0 x**2 - 1.0 x**3z}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                r$   r   r;   r'   r(   r   r"   Z TestStrAscii.test_polynomial_strg   s     $//#&'Sr   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)z0.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                r$   r   r%   r'   r(   r   r)   ZTestStrAscii.test_chebyshev_strr   s     $..%&Sr   z1.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)z0.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                r$   r   r*   r'   r(   r   r,   ZTestStrAscii.test_legendre_str~   r4   r   z1.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)z0.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                r$   r   r.   r'   r(   r   r0   ZTestStrAscii.test_hermite_str   s     $,,s#$Sr   z1.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)z0.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                r$   r   r1   r'   r(   r   r3   ZTestStrAscii.test_hermiteE_str   r4   r   z1.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)z0.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                r$   r   r5   r'   r(   r   r7   ZTestStrAscii.test_laguerre_str   r4   r   c                r8   )r    z0.0 + 1.0 xr9   z0.0 + 1.0 (-3.0 + 2.0x)Nr;   r<   r=   r   r>   Z(TestStrAscii.test_polynomial_str_domains   sP    $//1a&)*S$//1a&!Q89'Sr   r?   Nr@   rA   rE   )rG   rH   rI   rJ   rK   rL   rV   rM   rN   r   r"   r)   r,   r0   r3   r7   r>   rO   rP   rQ   rR   r   rS   rS   a   s    ^^'40- 1- [[^	,-	=>	 ; 	=.  [[^	34	FG	 % 	'.  [[^	34	FG	 % 	'.  [[^	34	FG	 % 	'.  [[^	56	IJ	 6 	8.  [[^	34	FG	 % 	'.  r   rS   c                   s   a  ] tR t^t o ]P
                  ! RRR7      R 4       tR tR tR t	R t
]P                  P                  RR4      R	 4       tR
tV tR# )TestLinebreakingr   Tr   c                r   rT   r   r   r   r   rV   ZTestLinebreaking.use_ascii   rW   r   c                s    \         P                  ! . RO4      p\        \        \	        V4      4      ^J4       \        \	        V4      R4       R# )Na zJ12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 + 123.0 x**4N)r[   r[   r[   r[   i{   r   r   r	   lenr   r   r      & r   test_single_line_one_lessZ*TestLinebreaking.test_single_line_one_less   s6    OOIJSQ["%SV+	r   c                s    \         P                  ! . RO4      p\        \        \	        V4      4      ^K4       \        \	        V4      R4       R# )r[   zK12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 +
1234.0 x**4N)r[   r[   r[   r[   i  r\   r^   r_   r   test_num_chars_is_linewidthZ,TestLinebreaking.test_num_chars_is_linewidth   s6    OOJKSQ["%SV-	r   c                s    \         P                  ! . RO4      p\        \        \	        V4      P                  R4      ^ ,          4      ^J4       \        \	        V4      R4       R# )r[   
zZ12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 + 1.0 x**4 +
12345678.0 x**5N)r[   r[   r[   r[   rB   r[   )r   r   r	   r]   r   splitr^   r_   r   6test_first_linebreak_multiline_one_less_than_linewidthZGTestLinebreaking.test_first_linebreak_multiline_one_less_than_linewidth   sI    OOE 	SQd+A./4SV<	r   c                s`    \         P                  ! . RO4      p\        \        V4      R4       R# )r[   z[12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.12 x**3 +
1.0 x**4 + 12345678.0 x**5N)r[   r[   r[   g=
)gArB   r[   )r   r   r	   r   r^   r_   r   +test_first_linebreak_multiline_on_linewidthZ<TestLinebreaking.test_first_linebreak_multiline_on_linewidth   s(    OOH 	SV=	r   c                s2   \         P                  ! . RO4      p\        VR7      ;_uu_ 4        \        \	        V4      V4       \	        V4      P                  R4       F  p\        \        V4      V8  4       K  	  RRR4       R#   + '       g   i     R# ; i)r    )Z	linewidthrb   N)
r    i
   i   i  i@  i  i'	 ip i@  i  )r   r   r   r	   r   rc   r   r]   )r   lwr   r   Zliner!   r   test_linewidth_printoptionZ+TestLinebreaking.test_linewidth_printoption   sf     OOG
 B''Q%AT*D	B' + ('''s   ABB	r?   N)rf   r   ))iK   z0.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)i-   z0.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)i   z0.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)rG   rH   rI   rJ   rK   rL   rV   r`   ra   rd   re   rM   rN   rg   rO   rP   rQ   rR   r   rZ   rZ      s`     ^^'40- 1-	 [[] 
- 
(
(r   rZ   c                  s   \         P                  ! . R	O4      p \         P                  ! . R	O4      p\         P                  ! R4       \	        \        V 4      R4       \	        \        V4      R4       \         P                  ! R4       \	        \        V 4      R4       \	        \        V4      R4       \        P                  ! \        4      ;_uu_ 4        \         P                  ! R4       RRR4       R#   + '       g   i     R# ; i)
rB   rU   rX   rY   r   r   r#   Zinvalid_inputNrA   )	r   r   r&   r   r	   r   rK   raises
ValueError)r   Zcs     r   test_set_default_printoptionsrj      s    	"Ay!A(Q12Q89	*Q23Q<=	z	"	"##O4 
#	"	"	"s   C44D	c                 s   . R	Op \         P                  ! V 4      p\         P                  ! \        V \        R7      4      p\         P                  ! R4       \        \        V4      R4       \        \        V4      R4       \         P                  ! R4       \        \        V4      R4       \        \        V4      R4       R# )
z%Test both numpy and built-in complex.Zdtyper   u*   1j + (1+1j)·x - (2-2j)·x² + (3+0j)·x³u+   1j + (1+1j)·x + (-2+2j)·x² + (3+0j)·x³rU   z)1j + (1+1j) x - (2-2j) x**2 + (3+0j) x**3z*1j + (1+1j) x + (-2+2j) x**2 + (3+0j) x**3N)y              ?y      ?      ?y              @y      @        )r   r   r   objectr   r	   r   )coefsZp1Zp2s      r   test_complex_coefficientsrn     s    -E		B	uF3	4B	*RFGRGH(REFRFGr   rk   u   1/2 + 3/4·xu   1 + 2·x + 5/7·x²z1.00z2.2u   1.00 + 2.2·x + 3·x²c                 s    \         P                  ! V 4      p\         P                  ! R 4       \        \	        V4      V4       R# r   r   r   r   r	   r   rm   r   r      && r    test_numeric_object_coefficientsrr     s.     	A	*Qr   u   1 + 2·x + f·x²u   1 + 2·x + [3, 4]·x²c                s    \         P                  ! V 4      p\         P                  ! R4       \        \	        V4      V4       R# )zC
Test coef fallback for object arrays of non-numeric coefficients.
r   Nro   rp   rq   r   #test_nonnumeric_object_coefficientsrs   &  s.     	A	*Qr   c                   s8   a  ] tR tRt o R tR tR tR tRtV t	R# )
TestFormati3  c                    \         P                  ! R 4       \         P                  ! . RO4      p\        \	        VR4      R4       R# )rU   r   u"   1.0 + 2.0·x + 0.0·x² - 1.0·x³NrB   rC   r    rF   r   r   r   r	   formatr^   r_   r   test_format_unicodeZTestFormat.test_format_unicode4  s0    ##G,OOM*VAy)+OPr   c                ru   )r   rU   z!1.0 + 2.0 x + 0.0 x**2 - 1.0 x**3Nrv   rw   r^   r_   r   test_format_asciiZTestFormat.test_format_ascii9  s3    ##I.OOM*1g C	
r   c                s    \         P                  ! R 4       \         P                  ! . RO4      p\        \	        V4      R4       \        V R4       R# )rU   rX   NrA   rw   r^   r_   r   test_empty_formatstrZTestFormat.test_empty_formatstr@  s:    ##G,OOI&VAY 89s56r   c                s    \         P                  ! . RO4      p\        P                  ! \        4      ;_uu_ 4        \        VR4       RRR4       R#   + '       g   i     R# ; i)rB   z.2fNrv   )r   r   rK   rh   ri   rx   r^   r_   r   test_bad_formatstrZTestFormat.test_bad_formatstrF  s8    OOM*]]:&&1e '&&&s   AA#	r?   N)
rG   rH   rI   rJ   ry   rz   r{   r|   rO   rP   rQ   rR   r   rt   rt   3  s     Q

7 r   rt   u   1.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                 s:    V ! . RORR7      p\        VR V4       R# )rB   zsymbolr   NrA   )r	   )r   r   r   rq   r   test_symbolr   L  s     	Ys#AAg;%r   c                   sD   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
TestRepriY  c                b    \        \        P                  ! ^ ^.4      4      pRp\        W4       R# )r    zFPolynomial([0., 1.], domain=[-1.,  1.], window=[-1.,  1.], symbol='x')N)reprr   r   r	   r<   r=   r   test_polynomial_reprZTestRepr.test_polynomial_reprZ  s-    4??Aq6*+ 	 	Sr   c                r   )r    zEChebyshev([0., 1.], domain=[-1.,  1.], window=[-1.,  1.], symbol='x')N)r   r   r&   r	   r<   r=   r   test_chebyshev_reprZTestRepr.test_chebyshev_reprb  s-    4>>1a&)* 	 	Sr   c                r   )r    zDLegendre([0., 1.], domain=[-1.,  1.], window=[-1.,  1.], symbol='x')N)r   r   r+   r	   r<   r=   r   test_legendre_reprZTestRepr.test_legendre_reprj  -    4==!Q() 	 	Sr   c                r   )r    zCHermite([0., 1.], domain=[-1.,  1.], window=[-1.,  1.], symbol='x')N)r   r   r/   r	   r<   r=   r   test_hermite_reprZTestRepr.test_hermite_reprr  s-    4<<A'( 	 	Sr   c                r   )r    zDHermiteE([0., 1.], domain=[-1.,  1.], window=[-1.,  1.], symbol='x')N)r   r   r2   r	   r<   r=   r   test_hermiteE_reprZTestRepr.test_hermiteE_reprz  r   r   c                r   )r    z@Laguerre([0., 1.], domain=[0., 1.], window=[0., 1.], symbol='x')N)r   r   r6   r	   r<   r=   r   test_laguerre_reprZTestRepr.test_laguerre_repr  r   r   r?   N)rG   rH   rI   rJ   r   r   r   r   r   r   rO   rP   rQ   rR   r   r   r   Y  s(      r   r   c                   sR   a  ] tR tRt o Rt]R 4       tR tR tR t	R t
R tR	tV tR
# )TestLatexRepri  z#Test the latex repr used by Jupyterc                sJ    RR lV n          V P                  4       V = #   T = i ; i)Fc                 s    \        V 4      # r   )r   )ZxZparenss   &&r   Z<lambda>Z(TestLatexRepr.as_latex.<locals>.<lambda>  s    Qr   )F)Z_repr_latex_scalar_repr_latex_)Zobjr   r   as_latexZTestLatexRepr.as_latex  s+    
 "@	'##%&&s    "c                s   \         P                  ! . RO4      p\        V P                  V4      R4       \         P                  ! . ROR	^ .R7      p\        V P                  V4      R4       \         P                  ! . ROR
R.R7      p\        V P                  V4      R4       \         P                  ! . ROR^ .R7      p\        V P                  V4      R4       R# )rB   z%$x \mapsto 1.0 + 2.0\,x + 3.0\,x^{2}$r9   zK$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}$zQ$x \mapsto 1.0 + 2.0\,\left(1.0 + 2.0x\right) + 3.0\,\left(1.0 + 2.0x\right)^{2}$NrA         rF   r   r   r	   r   r^   r_   r   test_simple_polynomialZ$TestLatexRepr.test_simple_polynomial  s    OOI&T]]1%4	6 OOIr1g6T]]1%Z	\ OOItSk:T]]1%T	V OOIr1g6T]]1%`	br   c                s    \         P                  ! . RO4      p\        V P                  V4      R4       \         P                  ! . ROR^ .R7      p\        V P                  V4      R4       R# )rB   z?$x \mapsto 1.0\,{T}_{0}(x) + 2.0\,{T}_{1}(x) + 3.0\,{T}_{2}(x)$r9   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)$NrA   rF   )r   r&   r	   r   r^   r_   r   test_basis_funcZTestLatexRepr.test_basis_func  sT    NN9%T]]1%N	P NN9b!W5T]]1%i	kr   c                sl    \         P                  ! . RO4      p\        V P                  V4      R4       R# )rB   zB$x \mapsto 1.0\,{He}_{0}(x) + 2.0\,{He}_{1}(x) + 3.0\,{He}_{2}(x)$NrA   )r   r2   r	   r   r^   r_   r   test_multichar_basis_funcZ'TestLatexRepr.test_multichar_basis_func  s'    MM)$T]]1%Q	Sr   c                s   \         P                  ! . R
ORR7      p\        V P                  V4      R4       \         P                  ! . R
OR^ .RR7      p\        V P                  V4      R4       \         P                  ! . R
ORR.RR7      p\        V P                  V4      R4       \         P                  ! . R
OR^ .RR7      p\        V P                  V4      R4       R	# )rB   r}   r~   z%$z \mapsto 1.0 + 2.0\,z + 3.0\,z^{2}$)r:   r   zK$z \mapsto 1.0 + 2.0\,\left(1.0 + z\right) + 3.0\,\left(1.0 + z\right)^{2}$r   zE$z \mapsto 1.0 + 2.0\,\left(2.0z\right) + 3.0\,\left(2.0z\right)^{2}$zQ$z \mapsto 1.0 + 2.0\,\left(1.0 + 2.0z\right) + 3.0\,\left(1.0 + 2.0z\right)^{2}$NrA   r   r   rF   r   r^   r_   r   test_symbol_basicZTestLatexRepr.test_symbol_basic  s    OOIc2T]]1%4	6 OOIr1gcBMM!-	
 OOItSk#FMM!*	
 OOIr1gcBMM!0	
r   c                s    \        \        ^^4      \        ^4      .4      p\        P                  ! V4      p\	        V P                  V4      R4       R# )rB   z$x \mapsto 1/2 + 1\,x$N)r   r   r   r   r	   r   )r   rm   r   r=   r   rr   Z.TestLatexRepr.test_numeric_object_coefficients  s=    x1~x{34OOE"T]]1%'ABr   r?   N)rG   rH   rI   rJ   __doc__Zstaticmethodr   r   r   r   r   rr   rO   rP   rQ   rR   r   r   r     s>     -' 'b*kS
"
HC Cr   r   c                   sv   a  ] tR tRt o Rt]P                  ! RRR7      R 4       tR tR t	R	 t
R
 tR tRtV tR# )TestPrintOptionsi  z
Test the output is properly configured via printoptions.
The exponential notation is enabled automatically when the values
are too small or too large.
r   Tr   c                r   rT   r   r   r   r   rV   ZTestPrintOptions.use_ascii  rW   r   c                s    \         P                  ! . RO4      p\        \        V4      R4       \	        ^R7      ;_uu_ 4        \        \        V4      R4       RRR4       R#   + '       g   i     R# ; i)rB   zC0.5 + 0.14285714 x + 14285714.28571429 x**2 + (1.42857143e+08) x**3	precisionz40.5 + 0.143 x + 14285714.286 x**2 + (1.429e+08) x**3Nr   g$I$I?gI$Ir?kAgm۶mAr   r   r	   r   r   r^   r_   r   test_strZTestPrintOptions.test_str  sS    OOHISV 7 	8 A&&Q "6 7 '&&&s   A""A3	c                s    \         P                  ! . RO4      p\        VP                  4       R4       \	        ^R7      ;_uu_ 4        \        VP                  4       R4       RRR4       R#   + '       g   i     R# ; i)rB   zp$x \mapsto \text{0.5} + \text{0.14285714}\,x + \text{14285714.28571429}\,x^{2} + \text{(1.42857143e+08)}\,x^{3}$r   za$x \mapsto \text{0.5} + \text{0.143}\,x + \text{14285714.286}\,x^{2} + \text{(1.429e+08)}\,x^{3}$Nr   )r   r   r	   r   r   r^   r_   r   
test_latexZTestPrintOptions.test_latex  s[    OOHIQ^^%/	0
 A&&)KL '&&&s   A,,A=	c                sv   \         P                  ! R.4      p\        \        V4      R4       \	        RR7      ;_uu_ 4        \        \        V4      R4       RRR4       \	        R^R7      ;_uu_ 4        \        \        V4      R4       RRR4       R#   + '       g   i     LE; i  + '       g   i     R# ; i)	rB   z0.5Zfixed)	floatmodez
0.50000000N)r   r   z0.5000r   r   r^   r_   r   
test_fixedZTestPrintOptions.test_fixed  sx    OOUG$SVU#G,,Q. - Gq99Q* :9 -, :99s   B4B'B$	'B8	c                s   \        \        4       F  w  r\        VR 7      ;_uu_ 4        \        P                  ! \        V^,          ^,           4       Uu. uF  pR^
V) ,          ,          NK  	  up4      p\        V4      P                  RR4      V8X  g   Q h RRR4       K  	  R# u upi   + '       g   i     K  ; i)r   gރB?rb   Z N)Z	enumerateSWITCH_TO_EXPr   r   r   Zranger   Zreplace)r   ZiZsr   s   &   r   test_switch_to_expZ#TestPrintOptions.test_switch_to_exp  s    m,DA**OO.3AFQJ.?%A.? &0"qb&%8%8.?%A B1v~~dC0A555 +* -%A +**s   ,B,B'/)B,'B,,B=c                sP   \         P                  ! \        \        .4      p\	        V4      R 8X  g   Q hVP                  4       R8X  g   Q h\        RRR7      ;_uu_ 4        \	        V4      R8X  g   Q hVP                  4       R8X  g   Q h RRR4       R#   + '       g   i     R# ; i)znan + inf xz&$x \mapsto \text{nan} + \text{inf}\,x$ZNANZINF)ZnanstrZinfstrzNAN + INF xz&$x \mapsto \text{NAN} + \text{INF}\,x$N)r   r   r   r   r   r   r   r^   r_   r   test_non_finiteZ TestPrintOptions.test_non_finite$  s    OOS#J'1v&&&~~#LLLLu55q6]***>>#9: : : 6555s   *BB%	r?   N)rG   rH   rI   rJ   r   rK   rL   rV   r   r   r   r   r   rO   rP   rQ   rR   r   r   r     sH      ^^'40- 1-7
L+6: :r   r   )rm   r   )rB   rC   Zf)r   r   )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**5)(Zdecimalr   Z	fractionsr   Zmathr   r   rK   Znumpy.polynomialZ
polynomialr   Znumpy._corer   r   r   Znumpy.testingr   r	   r
   rS   rZ   rj   rn   rM   rN   rl   rr   rs   rt   r   r&   r/   r2   r6   r+   r   r   r   r   r   r?   r   r   <module>r      s        3 3 /Q QfT Tl?( ?(D
5H )
HQNHQN+6: Aq(1a.!0 GFOWU^Q/v> 
, 

 )
;f%':;
Aq1a&>(*BC, 	 2 	__/0	^^89	\\67	]]9:	]]78	]]78+ &&
/ /dXC XCv38: 8:r   