1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
U
P±d?Rã
@sÌddlmZmZddlZddlmZmZmZddlm    Z
ddl m Z m Z ddlmZddlmZGdd„dƒZGd    d
„d
ƒZGd d „d ƒZd d„Zdd„Zej deeddƒeddƒgeddfeddeddƒgeddfeedƒedƒdgeddff¡dd„ƒZej deddd gedd!feddddggedd"ff¡d#d$„ƒZGd%d&„d&ƒZej d'e
jd(fe
jd)fe
jd*fe
j d+fe
j!d,fe
j"d-ff¡d.d/„ƒZ#Gd0d1„d1ƒZ$Gd2d3„d3ƒZ%d4Z&Gd5d6„d6ƒZ'dS)7é)ÚnanÚinfN)ÚarrayÚarangeÚ printoptions)Ú assert_equalÚassert_)ÚFraction)ÚDecimalc@s~eZdZejddddd„ƒZej dddd    gd
fd d d    d gd fedƒdff¡dd„ƒZ    ej dddd    gdfd d d    d gdfedƒdff¡dd„ƒZ
ej dddd    gdfd d d    d gdfedƒdff¡dd„ƒZ ej dddd    gdfd d d    d gdfedƒdff¡dd „ƒZ ej dddd    gd!fd d d    d gd"fedƒd#ff¡d$d%„ƒZ ej dddd    gd&fd d d    d gd'fedƒd(ff¡d)d*„ƒZd+S),ÚTestStrUnicodeSuperSubscriptsÚclassT©ZscopeZautousecCst d¡dS©NÚunicode©ÚpolyÚset_default_printstyle©Úself©rú[d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\numpy/polynomial/tests/test_printing.pyÚ use_unicodesz)TestStrUnicodeSuperSubscripts.use_unicode©ÚinpÚtgtéééõ1.0 + 2.0·x + 3.0·x²éÿÿÿÿru#-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¹¹cCstt |¡ƒ}t||ƒdS©N©ÚstrrÚ
Polynomialr©rrrÚresrrrÚtest_polynomial_strsz1TestStrUnicodeSuperSubscripts.test_polynomial_strõ!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)cCstt |¡ƒ}t||ƒdSr!©r#rÚ    Chebyshevrr%rrrÚtest_chebyshev_strsz0TestStrUnicodeSuperSubscripts.test_chebyshev_stru!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)cCstt |¡ƒ}t||ƒdSr!©r#rÚLegendrerr%rrrÚtest_legendre_str(sz/TestStrUnicodeSuperSubscripts.test_legendre_stru!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)cCstt |¡ƒ}t||ƒdSr!©r#rÚHermiterr%rrrÚtest_hermite_str3sz.TestStrUnicodeSuperSubscripts.test_hermite_stru#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)cCstt |¡ƒ}t||ƒdSr!©r#rÚHermiteErr%rrrÚtest_hermiteE_str>s    z/TestStrUnicodeSuperSubscripts.test_hermiteE_stru!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)cCstt |¡ƒ}t||ƒdSr!©r#rÚLaguerrerr%rrrÚtest_laguerre_strJsz/TestStrUnicodeSuperSubscripts.test_laguerre_strN)Ú__name__Ú
__module__Ú __qualname__ÚpytestÚfixturerÚmarkÚ parametrizerr'r+r.r1r4r7rrrrr sL 
 
ý
 
ý
 
ý
 
ý
 
ý
 
ýr c@s~eZdZejddddd„ƒZej dddd    gd
fd d d    d gd fedƒdff¡dd„ƒZ    ej dddd    gdfd d d    d gdfedƒdff¡dd„ƒZ
ej dddd    gdfd d d    d gdfedƒdff¡dd„ƒZ ej dddd    gdfd d d    d gdfedƒdff¡dd „ƒZ ej dddd    gd!fd d d    d gd"fedƒd#ff¡d$d%„ƒZ ej dddd    gd&fd d d    d gd'fedƒd(ff¡d)d*„ƒZd+S),Ú TestStrAsciir Tr cCst d¡dS©NÚasciirrrrrÚ    use_asciiXszTestStrAscii.use_asciirrrrú1.0 + 2.0 x + 3.0 x**2rrz"-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**11cCstt |¡ƒ}t||ƒdSr!r"r%rrrr'\sz TestStrAscii.test_polynomial_strú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)cCstt |¡ƒ}t||ƒdSr!r)r%rrrr+gs    zTestStrAscii.test_chebyshev_strz1.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)cCstt |¡ƒ}t||ƒdSr!r,r%rrrr.ss    zTestStrAscii.test_legendre_strz1.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)cCstt |¡ƒ}t||ƒdSr!r/r%rrrr1s    zTestStrAscii.test_hermite_strz1.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)cCstt |¡ƒ}t||ƒdSr!r2r%rrrr4‹s    zTestStrAscii.test_hermiteE_strz1.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)cCstt |¡ƒ}t||ƒdSr!r5r%rrrr7—s    zTestStrAscii.test_laguerre_strN)r8r9r:r;r<rBr=r>rr'r+r.r1r4r7rrrrr?VsL 
 
ý
 
ý
 
ý
 
ý
 
ý
 
ýr?c@sXeZdZejddddd„ƒZdd„Zdd    „Zd
d „Zd d „Z    ej
  dd¡dd„ƒZ dS)ÚTestLinebreakingr Tr cCst d¡dSr@rrrrrrB¦szTestLinebreaking.use_asciicCs8t dddddg¡}ttt|ƒƒdƒtt|ƒdƒdS)NéNa¼é{éJzJ12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 + 123.0 x**4©rr$rÚlenr#©rÚprrrÚtest_single_line_one_lessªs
ÿz*TestLinebreaking.test_single_line_one_lesscCs8t dddddg¡}ttt|ƒƒdƒtt|ƒdƒdS)NrFiÒéKzK12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 +
1234.0 x**4rIrKrrrÚtest_num_chars_is_linewidth³s
ÿz,TestLinebreaking.test_num_chars_is_linewidthcCsDt ddddddg¡}ttt|ƒ d¡dƒdƒtt|ƒdƒdS)NrFrÚ
rrHzZ12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.0 x**3 + 1.0 x**4 +
12345678.0 x**5)rr$rrJr#ÚsplitrKrrrÚ6test_first_linebreak_multiline_one_less_than_linewidth¼sÿÿzGTestLinebreaking.test_first_linebreak_multiline_one_less_than_linewidthcCs(t ddddddg¡}tt|ƒdƒdS)NrFg=
×Ã)ŒgArz[12345678.0 + 12345678.0 x + 12345678.0 x**2 + 12345678.12 x**3 +
1.0 x**4 + 12345678.0 x**5)rr$rr#rKrrrÚ+test_first_linebreak_multiline_on_linewidthÇs ÿÿz<TestLinebreaking.test_first_linebreak_multiline_on_linewidth)Úlwr))rNz€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 Csjt ddddddddd    d
g
¡}t|d 8tt|ƒ|ƒt|ƒ d ¡D]}tt|ƒ|kƒqFW5QRXdS) Nré
éÈi¸ i@œi ¡iÀ'    ipi@i„)Z    linewidthrP)rr$rrr#rQrrJ)rrTrrLÚlinerrrÚtest_linewidth_printoptionÑs ÿ z+TestLinebreaking.test_linewidth_printoptionN) r8r9r:r;r<rBrMrOrRrSr=r>rZrrrrrE¤s 
         
rEc    Cst dddg¡}t dddg¡}t d¡tt|ƒdƒtt|ƒdƒt d¡tt|ƒdƒtt|ƒd    ƒt t¡t d
¡W5QRXdS) NrrrrArCrDrrr(Z invalid_input)    rr$r*rrr#r;ÚraisesÚ
ValueError)rLÚcrrrÚtest_set_default_printoptionsæs
 
 r^cCsxddddg}t |¡}t t|td¡}t d¡tt|ƒdƒtt|ƒdƒt d    ¡tt|ƒd
ƒtt|ƒd ƒd S) z%Test both numpy and built-in complex.yð?yð?ð?yÀ@y@©Zdtyperu*1j + (1+1j)·x - (2-2j)·x² + (3+0j)·x³u+1j + (1+1j)·x + (-2+2j)·x² + (3+0j)·x³rAz)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Úp2rrrÚtest_complex_coefficientsós 
 
 
rd)rarrrrér_u 1/2 + 3/4·xééu1 + 2·x + 5/7·x²z1.00z2.2u1.00 + 2.2·x + 3·x²cCs&t |¡}t d¡tt|ƒ|ƒdSr©rr$rrr#©rarrLrrrÚ test_numeric_object_coefficientss
 
rjÚfu1 + 2·x + f·x²u1 + 2·x + [3, 4]·x²cCs&t |¡}t d¡tt|ƒ|ƒdS)zK
    Test coef fallback for object arrays of non-numeric coefficients.
    rNrhrirrrÚ#test_nonnumeric_object_coefficientss
 
rlc@s,eZdZdd„Zdd„Zdd„Zdd„Zd    S)
Ú
TestFormatcCs0t d¡t ddddg¡}tt|dƒdƒdS)NrArrrrru"1.0 + 2.0·x + 0.0·x² - 1.0·x³©rrr$rÚformatrKrrrÚtest_format_unicode!s
zTestFormat.test_format_unicodecCs0t d¡t ddddg¡}tt|dƒdƒdS)NrrrrrrAz!1.0 + 2.0 x + 0.0 x**2 - 1.0 x**3rnrKrrrÚtest_format_ascii&s 
ÿzTestFormat.test_format_asciicCs8t d¡t dddg¡}tt|ƒdƒt|›dƒdS)NrArrrrCrnrKrrrÚtest_empty_formatstr-s
zTestFormat.test_empty_formatstrc    Cs6t ddddg¡}t t¡t|dƒW5QRXdS)Nrrrrz.2f)rr$r;r[r\rorKrrrÚtest_bad_formatstr3s zTestFormat.test_bad_formatstrN)r8r9r:rprqrrrsrrrrrm srm)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)cCs$|dddgdd}t|d›|ƒdS)NrrrÚz©Úsymbolr)r)rrrLrrrÚ test_symbol9s    rwc@s<eZdZdd„Zdd„Zdd„Zdd„Zd    d
„Zd d „Zd S)ÚTestReprcCs$tt ddg¡ƒ}d}t||ƒdS)NrrzBPolynomial([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))Úreprrr$r©rr&rrrrr'GsÿzTestRepr.test_polynomial_strcCs$tt ddg¡ƒ}d}t||ƒdS)NrrzAChebyshev([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))ryrr*rrzrrrr+OsÿzTestRepr.test_chebyshev_strcCs$tt ddg¡ƒ}d}t||ƒdS)Nrrz@Legendre([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))ryrr-rrzrrrÚtest_legendre_reprWsÿzTestRepr.test_legendre_reprcCs$tt ddg¡ƒ}d}t||ƒdS)Nrrz?Hermite([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))ryrr0rrzrrrÚtest_hermite_repr_sÿzTestRepr.test_hermite_reprcCs$tt ddg¡ƒ}d}t||ƒdS)Nrrz@HermiteE([0., 1.], domain=[-1,  1], window=[-1,  1], symbol='x'))ryrr3rrzrrrÚtest_hermiteE_reprgsÿzTestRepr.test_hermiteE_reprcCs$tt ddg¡ƒ}d}t||ƒdS)Nrrz<Laguerre([0., 1.], domain=[0, 1], window=[0, 1], symbol='x'))ryrr6rrzrrrÚtest_laguerre_reprosÿzTestRepr.test_laguerre_reprN)    r8r9r:r'r+r{r|r}r~rrrrrxFs rxc@s8eZdZdZdd„Zdd„Zdd„Zdd    „Zd
d „Zd S) Ú TestLatexReprz#Test the latex repr used by JupytercCs$ddd„|_z | ¡W¢S|`XdS)NFcSst|ƒSr!)r#)ÚxÚparensrrrÚ<lambda>óz(TestLatexRepr.as_latex.<locals>.<lambda>)F)Z_repr_latex_scalarÚ _repr_latex_)rÚobjrrrÚas_latex{s  zTestLatexRepr.as_latexcCsœt dddg¡}t| |¡dƒtjdddgddgd}t| |¡dƒtjdddgd    d
gd}t| |¡d ƒtjdddgd dgd}t| |¡d ƒdS)Nrrrz%$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}$rzQ$x \mapsto 1.0 + 2.0\,\left(1.0 + 2.0x\right) + 3.0\,\left(1.0 + 2.0x\right)^{2}$©rr$rr†rKrrrÚtest_simple_polynomial…s 
ÿ
ÿ
ÿ
ÿz$TestLatexRepr.test_simple_polynomialcCsLt dddg¡}t| |¡dƒtjdddgddgd}t| |¡dƒdS)    Nrrrz?$x \mapsto 1.0\,{T}_{0}(x) + 2.0\,{T}_{1}(x) + 3.0\,{T}_{2}(x)$rrrˆ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)$)rr*rr†rKrrrÚtest_basis_funcšs
ÿ
ÿzTestLatexRepr.test_basis_funccCs$t dddg¡}t| |¡dƒdS)NrrrzB$x \mapsto 1.0\,{He}_{0}(x) + 2.0\,{He}_{1}(x) + 3.0\,{He}_{2}(x)$)rr3rr†rKrrrÚtest_multichar_basis_func£s
ÿz'TestLatexRepr.test_multichar_basis_funccCs¦tjdddgdd}t| |¡dƒtjdddgddgdd    }t| |¡d
ƒtjdddgd d gdd    }t| |¡d ƒtjdddgddgdd    }t| |¡dƒdS)Nrrrrtruz%$z \mapsto 1.0 + 2.0\,z + 3.0\,z^{2}$r‡r)r‰rvzK$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}$rzQ$z \mapsto 1.0 + 2.0\,\left(1.0 + 2.0z\right) + 3.0\,\left(1.0 + 2.0z\right)^{2}$rŒrKrrrÚtest_symbol_basic¨s&
ÿý    ý    ýzTestLatexRepr.test_symbol_basicN)    r8r9r:Ú__doc__r†rrŽrrrrrrrxs 
    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**5c@sNeZdZdZejddddd„ƒZdd„Zd    d
„Zd d „Z    d d„Z
dd„Z dS)ÚTestPrintOptionsz©
    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 cCst d¡dSr@rrrrrrBászTestPrintOptions.use_asciic    CsHt ddddg¡}tt|ƒdƒtddtt|ƒdƒW5QRXdS)    Nr‹ç’$I’$IÂ?çI’$Ir?kAçmÛ¶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#rrKrrrÚtest_strås zTestPrintOptions.test_strc    CsHt ddddg¡}t| ¡dƒtddt| ¡dƒW5QRXdS)    Nr‹r“r”r•zp$x \mapsto \text{0.5} + \text{0.14285714}\,x + \text{14285714.28571429}\,x^{2} + \text{(1.42857143e+08)}\,x^{3}$rr–za$x \mapsto \text{0.5} + \text{0.143}\,x + \text{14285714.286}\,x^{2} + \text{(1.429e+08)}\,x^{3}$)rr$rr„rrKrrrÚ
test_latexîsÿ ÿzTestPrintOptions.test_latexc    Csht dg¡}tt|ƒdƒtddtt|ƒdƒW5QRXtdddtt|ƒdƒW5QRXdS)    Nr‹z0.5Zfixed)Ú    floatmodez
0.50000000re)r›r—z0.5000r˜rKrrrÚ
test_fixedús   zTestPrintOptions.test_fixedc
CsdttƒD]V\}}t|d>t dd„t|ddƒDƒ¡}t|ƒ dd¡|ksTt‚W5QRXqdS)Nr–cSsg|]}dd| ‘qS)gރBÊÀó?rWr)Ú.0ÚirrrÚ
<listcomp>sÿz7TestPrintOptions.test_switch_to_exp.<locals>.<listcomp>rrrPú )    Ú    enumerateÚ SWITCH_TO_EXPrrr$Úranger#ÚreplaceÚAssertionError)rržÚsrLrrrÚtest_switch_to_exps  
ÿz#TestPrintOptions.test_switch_to_expc    Csjt ttg¡}t|ƒdkst‚| ¡dks.t‚tddd&t|ƒdksLt‚| ¡dks\t‚W5QRXdS)Nz nan + inf xz&$x \mapsto \text{nan} + \text{inf}\,x$ZNANZINF)ZnanstrZinfstrz NAN + INF xz&$x \mapsto \text{NAN} + \text{INF}\,x$)rr$rrr#r¥r„rrKrrrÚtest_non_finite sÿz TestPrintOptions.test_non_finiteN) r8r9r:r‘r;r<rBr™ršrœr§r¨rrrrr’Ús 
     
r’)(Úmathrrr;Z
numpy.corerrrZnumpy.polynomialZ
polynomialrZ numpy.testingrrZ    fractionsr    Údecimalr
r r?rEr^rdr=r>r`rjrlrmr$r*r0r3r6r-rwrxrr¢r’rrrrÚ<module>sT   JNB ÿÿÿù
þ
    ú
2U