hyb
2025-12-23 10f3a1daddfbc7fa3dd2069197d83e8b6ef19176
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
Ë
Kñúhežãóp—dZddlZddlZddlZddlmZddlZddlm    Z
dgZ Gd„dej«Z y)a
Abstract base class for the various polynomial Classes.
 
The ABCPolyBase class provides the methods needed to implement the common API
for the various polynomial classes. It operates as a mixin, but uses the
abc module from the stdlib, hence it is only available for Python >= 2.6.
 
éN)ÚCallableé)Ú    polyutilsÚ ABCPolyBasec óP—eZdZdZdZdZdZejdddddd    d
d d d dœ
«Z    ejdddddddddddœ
«Z
e jdk( Z ed„«Zeej"d„««Zeej"d„««Zeej"d„««Zeej"d„««Zeej"d„««Zeej"d „««Zeej"d!„««Zeej"dgd"„««Zeej"d#„««Zeej"d$„««Zeej"d%„««Zeej"d&„««Zeej"d'„««Zeej"d(„««Z eej"d)„««Z!d*„Z"d+„Z#d,„Z$d-„Z%d.„Z&dhd0„Z'd1„Z(d2„Z)d3„Z*d4„Z+e,d5„«Z-e,d6„«Z.e,d7„«Z/edid8„«Z0d9e1d:e2d;e2fd<„Z3d=„Z4d>„Z5d?„Z6d@„Z7dA„Z8dB„Z9dC„Z:dD„Z;dE„Z<dF„Z=dG„Z>dH„Z?dI„Z@dJ„ZAdK„ZBdL„ZCdM„ZDdN„ZEdO„ZFdP„ZGdQ„ZHdR„ZIdS„ZJdT„ZKdU„ZLdV„ZMdW„ZNdX„ZOdjdY„ZPdZ„ZQdkd[„ZRd\„ZSd]gdfd^„ZTdld_„ZUd`„ZVdmda„ZWe,        dndb„«ZXe,gdd/fdc„«ZYe,dhdd„«ZZe,dhde„«Z[e,dodf„«Z\y)praêAn abstract base class for immutable series classes.
 
    ABCPolyBase provides the standard Python numerical methods
    '+', '-', '*', '//', '%', 'divmod', '**', and '()' along with the
    methods listed below.
 
    Parameters
    ----------
    coef : array_like
        Series coefficients in order of increasing degree, i.e.,
        ``(1, 2, 3)`` gives ``1*P_0(x) + 2*P_1(x) + 3*P_2(x)``, where
        ``P_i`` is the basis polynomials of degree ``i``.
    domain : (2,) array_like, optional
        Domain to use. The interval ``[domain[0], domain[1]]`` is mapped
        to the interval ``[window[0], window[1]]`` by shifting and scaling.
        The default value is the derived class domain.
    window : (2,) array_like, optional
        Window, see domain for its use. The default value is the
        derived class window.
    symbol : str, optional
        Symbol used to represent the independent variable in string
        representations of the polynomial expression, e.g. for printing.
        The symbol must be a valid Python identifier. Default value is 'x'.
 
        .. versionadded:: 1.24
 
    Attributes
    ----------
    coef : (N,) ndarray
        Series coefficients in order of increasing degree.
    domain : (2,) ndarray
        Domain that is mapped to window.
    window : (2,) ndarray
        Window that domain is mapped to.
    symbol : str
        Symbol representing the independent variable.
 
    Class Attributes
    ----------------
    maxpower : int
        Maximum power allowed, i.e., the largest number ``n`` such that
        ``p(x)**n`` is allowed. This is to limit runaway polynomial size.
    domain : (2,) ndarray
        Default domain of the class.
    window : (2,) ndarray
        Default window of the class.
 
    Nédu⁰õ¹õ²õ³u⁴u⁵u⁶u⁷u⁸u⁹)
Ú0Ú1Ú2Ú3Ú4Ú5Ú6Ú7Ú8Ú9u₀u₁u₂u₃u₄u₅u₆u₇u₈u₉Úntcó—|jS©N)Ú_symbol©Úselfs úMH:\Change_password\venv_build\Lib\site-packages\numpy/polynomial/_polybase.pyÚsymbolzABCPolyBase.symbolns €à|‰|Ðócó—yr©rs rÚdomainzABCPolyBase.domainró€ð     rcó—yrr rs rÚwindowzABCPolyBase.windowwr"rcó—yrr rs rÚ
basis_namezABCPolyBase.basis_name|r"rcó—yrr ©Úc1Úc2s  rÚ_addzABCPolyBase._addr"rcó—yrr r(s  rÚ_subzABCPolyBase._sub†r"rcó—yrr r(s  rÚ_mulzABCPolyBase._mul‹r"rcó—yrr r(s  rÚ_divzABCPolyBase._divr"rcó—yrr )ÚcÚpowÚmaxpowers   rÚ_powzABCPolyBase._pow•r"rcó—yrr )Úxr3s  rÚ_valzABCPolyBase._valšr"rcó—yrr )r3ÚmÚkÚlbndÚscls     rÚ_intzABCPolyBase._intŸr"rcó—yrr )r3r;r>s   rÚ_derzABCPolyBase._der¤r"rcó—yrr )r8ÚyÚdegÚrcondÚfulls     rÚ_fitzABCPolyBase._fit©r"rcó—yrr )Úoffr>s  rÚ_linezABCPolyBase._line®r"rcó—yrr )r3s rÚ_rootszABCPolyBase._roots³r"rcó—yrr )Úrs rÚ
_fromrootszABCPolyBase._fromroots¸r"rcó´—t|j«t|j«k(xr,tj|j|jk(«S)a&Check if coefficients match.
 
        Parameters
        ----------
        other : class instance
            The other class must have the ``coef`` attribute.
 
        Returns
        -------
        bool : boolean
            True if the coefficients are the same, False otherwise.
 
        )ÚlenÚcoefÚnpÚall©rÚothers  rÚ has_samecoefzABCPolyBase.has_samecoef½s?€ô —    ‘    ‹Nœc %§*¡*›oÑ -ò 0Ü—‘t—y‘y E§J¡JÑ.Ó/ð    
rcóZ—tj|j|jk(«S)aCheck if domains match.
 
        Parameters
        ----------
        other : class instance
            The other class must have the ``domain`` attribute.
 
        Returns
        -------
        bool : boolean
            True if the domains are the same, False otherwise.
 
        )rSrTr!rUs  rÚhas_samedomainzABCPolyBase.has_samedomainÐó €ôv‰vd—k‘k U§\¡\Ñ1Ó2Ð2rcóZ—tj|j|jk(«S)aCheck if windows match.
 
        Parameters
        ----------
        other : class instance
            The other class must have the ``window`` attribute.
 
        Returns
        -------
        bool : boolean
            True if the windows are the same, False otherwise.
 
        )rSrTr$rUs  rÚhas_samewindowzABCPolyBase.has_samewindowàrZrcó.—t||j«S)záCheck if types match.
 
        Parameters
        ----------
        other : object
            Class instance.
 
        Returns
        -------
        bool : boolean
            True if other is same class as self
 
        )Ú
isinstanceÚ    __class__rUs  rÚ has_sametypezABCPolyBase.has_sametypeðs€ô˜% §¡Ó0Ð0rcó¤—t|t«r¿t||j«s td«‚t    j
|j |j k(«s td«‚t    j
|j|jk(«s td«‚|j|jk7r td«‚|jS|S)apInterpret other as polynomial coefficients.
 
        The `other` argument is checked to see if it is of the same
        class as self with identical domain and window. If so,
        return its coefficients, otherwise return `other`.
 
        Parameters
        ----------
        other : anything
            Object to be checked.
 
        Returns
        -------
        coef
            The coefficients of`other` if it is a compatible instance,
            of ABCPolyBase, otherwise `other`.
 
        Raises
        ------
        TypeError
            When `other` is an incompatible instance of ABCPolyBase.
 
        zPolynomial types differzDomains differzWindows differzPolynomial symbols differ) r^rr_Ú    TypeErrorrSrTr!r$rÚ
ValueErrorrRrUs  rÚ_get_coefficientszABCPolyBase._get_coefficientss€ô0 eœ[Ô )ܘe T§^¡^Ô4ÜР9Ó:Ð:Ü—V‘V˜DŸK™K¨5¯<©<Ñ7Ô8ÜР0Ó1Ð1Ü—V‘V˜DŸK™K¨5¯<©<Ñ7Ô8ÜР0Ó1Ð1Ø—‘ § ¡ Ò,Ü Ð!<Ó=Ð=Ø—:‘:Р؈ rr8có®—tj|gd¬«\}||_|:tj|gd¬«\}t|«dk7r t    d«‚||_|:tj|gd¬«\}t|«dk7r t    d«‚||_    |j«s t    d«‚    ||_
y#t$r td«‚wxYw)NF©Útriméz$Domain has wrong number of elements.z$Window has wrong number of elements.z/Symbol string must be a valid Python identifierz!Symbol must be a non-empty string) ÚpuÚ    as_seriesrRrQrcr!r$Ú isidentifierÚAttributeErrorrbr)rrRr!r$rs     rÚ__init__zABCPolyBase.__init__$sހÜ—‘˜t˜f¨5Ô1‰ˆØˆŒ    à Ð Ü—|‘| V H°5Ô9‰HˆVܐ6‹{˜aÒÜ Ð!GÓHÐHØ ˆDŒKà Ð Ü—|‘| V H°5Ô9‰HˆVܐ6‹{˜aÒÜ Ð!GÓHÐHØ ˆDŒKð        AØ×&Ñ&Ô(Ü ØEóðð)ðˆ øôò    AÜÐ?Ó@Ð @ð    Aús ÂB?Â?Cc
óô—t|j«dd}t|j«dd}t|j«dd}|jj
}|›d|›d|›d|›d|j ›d
S)Nééÿÿÿÿú(z    , domain=z    , window=z
, symbol='z'))ÚreprrRr!r$r_Ú__name__r)rrRr!r$Únames     rÚ__repr__zABCPolyBase.__repr__Bs€ÜD—I‘I‹˜q Ð$ˆÜd—k‘kÓ" 1 RÐ(ˆÜd—k‘kÓ" 1 RÐ(ˆØ~‰~×&Ñ&ˆØ&˜˜$˜˜y¨¨°    ¸&¸ðBØŸ;™;˜- rð+ð    ,rcóâ—|dk(r|j«S|dvrtd|›d|j›d«‚|dk(r|j|j«S|j|j
«S)NÚ)ÚasciiÚunicodezUnsupported format string 'z ' passed to z4.__format__. Valid options are 'ascii' and 'unicode'rx)Ú__str__rcr_Ú_generate_stringÚ_str_term_asciiÚ_str_term_unicode)rÚfmt_strs  rÚ
__format__zABCPolyBase.__format__Js€€Ø bŠ=Ø—<‘<“>Ð !Ø Ð.Ñ .ÜØ-¨g¨Y°lØ—>‘>Ð"ð#(ð)óð ð
gÒ Ø×(Ñ(¨×)=Ñ)=Ó>Ð >Ø×$Ñ$ T×%;Ñ%;Ó<Ð<rcó†—|jr|j|j«S|j|j«Sr)Ú _use_unicoder{r}r|rs rrzzABCPolyBase.__str__Ws9€Ø × Ò Ø×(Ñ(¨×)?Ñ)?Ó@Ð @Ø×$Ñ$ T×%9Ñ%9Ó:Ð:rcó—tj«jdd«}|dkrd}tj|j
d«}|j «\}}|jtj||«\}}|rd|zdz}t|j
dd«D]É\}}    |dz }t|dz«}
    |    dk\rd    tj|    d
¬ «z} nd tj|     d
¬ «z} | ||
|«z } t|jd «d«t| «z} |t|j
dd«dz
kr| dz } | |k\r| jdd d«} || z }ŒË|S#t$rd    |    ›} YŒ‰wxYw)zŒ
        Generate the full string representation of the polynomial, using
        ``term_method`` to generate each polynomial term.
        Ú    linewidthéKrrrqú)Nú z+ T©Úparensz- ú
rprh)rSÚget_printoptionsÚgetriÚ format_floatrRÚmapparmsÚ _format_termÚ    enumerateÚstrrbrQÚsplitÚreplace) rÚ term_methodrƒÚoutrIÚscaleÚ scaled_symbolÚ needs_parensÚirRÚpowerÚ    next_termÚline_lens              rr{zABCPolyBase._generate_string\s–€ô ×'Ñ'Ó)×-Ñ-¨k¸2Ó>ˆ    Ø qŠ=؈I܏o‰o˜dŸi™i¨™lÓ+ˆà—]‘]“_‰
ˆˆUà&*×&7Ñ&7¼¿¹Ø8;¸Uó'DÑ#ˆ |á Ø -Ñ/°#Ñ5ˆMä  §¡¨1¨2 Ó/ò    ‰GˆAˆtØ 3‰JˆCܘ˜A™“JˆEð
 (ؘ1’9Ø $¤r§¡°tÀDÔ'IÑ I‘Ià $¤r§¡¸°uÀTÔ'JÑ JIð ™ U¨MÓ:Ñ :ˆIä˜3Ÿ9™9 T›?¨2Ñ.Ó/´#°i³.Ñ@ˆHð”3t—y‘y  }Ó%¨Ñ)Ò)ؘA‘ à˜9Ò$Ø%×-Ñ-¨c°4¸Ó;    Ø 9Ñ ‰Cð3    ð4ˆ
øôò (Ø   ˜K’    ð (úsÃ;E5Å5FÆFcóŒ—|j€ td«‚d|j›|j|j«›d|›dS)zƒ
        String representation of single polynomial term using unicode
        characters for superscripts and subscripts.
        zZSubclasses must define either a basis_name, or override _str_term_unicode(cls, i, arg_str)õ·rqr…)r&ÚNotImplementedErrorÚ    translateÚ_subscript_mapping©Úclsr˜Úarg_strs   rr}zABCPolyBase._str_term_unicodeŠsU€ð >‰>Ð !Ü%ð5óð ðS—^‘^Ð$ Q§[¡[°×1GÑ1GÓ%HÐ$IؐG9˜Aðð     rcó\—|j€ td«‚d|j›d|›d|›dS)z’
        String representation of a single polynomial term using ** and _ to
        represent superscripts and subscripts, respectively.
        zXSubclasses must define either a basis_name, or override _str_term_ascii(cls, i, arg_str)r†Ú_rqr…©r&ržr¡s   rr|zABCPolyBase._str_term_ascii˜sB€ð >‰>Ð !Ü%ð3óð ð3—>‘>Ð" ! A 3 a¨ y°Ð2Ð2rcó\—|j€ td«‚d|j›d|›d|›dS)NzbSubclasses must define either a basis name, or override _repr_latex_term(i, arg_str, needs_parens)ú{z}_{z}(r…r¦)r¢r˜r£r—s    rÚ_repr_latex_termzABCPolyBase._repr_latex_term¥s@€à >‰>Ð !Ü%ð=ó>ð >ðC—N‘NÐ# 5¨¨¨3¨w¨i°qÐ9Ð9rcó8—dtj||¬«›dS)Nz\text{r‡ú})rirŒ)r8rˆs  rÚ_repr_latex_scalarzABCPolyBase._repr_latex_scalar®s€ðœ"Ÿ/™/¨!°FÔ;Ð<¸BÐ?Ð?rÚ scalar_formatrIr•có
—|dk(r|dk(r|j}d}||fS|dk(r||«›d|j›}d}||fS|dk(r||«›|j›}d}||fS||«›d||«›|j›}d}||fS)z' Format a single term in the expansion rrFú + T)r)rr­rIr•Útermr—s      rrŽzABCPolyBase._format_term´sЀà !Š8˜ š
Ø—;‘;ˆDØ ˆLð\Ð!Ð!ðaŠZÙ# CÓ(Ð)¨¨T¯[©[¨MÐ:ˆD؈Lð\Ð!Ð!ðAŠXÙ# EÓ*Ð+¨D¯K©K¨=Ð9ˆD؈Lð\Ð!Ð!ñ    ! Ó%Ð& cÙ  Ó'Ð(¨¯©¨ ð7ð ð ˆLؐ\Ð!Ð!rcó†—|j«\}}|j|j||«\}}dj}g}t    |j
«D]À\}}|dk(r|j|«›}    nct |tj«sd|j|«›d}    n3|dk\rd|j|d¬«›}    nd|j| d¬«›}    |j|||«}
|
d    k(r|    } n|    ›d
|
›} |dk(r|| «} |j| «ŒÂ|rd j|«} nd } d |j›d| ›d S)Nz\color{{LightGray}}{{{}}}rz + (r…r¯Tr‡z - r z\,rwr ú$z     \mapsto ) rrŽr¬ÚformatrrRr^ÚnumbersÚRealr©ÚappendÚjoinr) rrIr•r°r—ÚmuteÚpartsr˜r3Úcoef_strÚterm_strÚpartÚbodys              rÚ _repr_latex_zABCPolyBase._repr_latex_Çsf€à—]‘]“_‰
ˆˆUØ!×.Ñ.¨t×/FÑ/FØ/2°Eó;шˆlð,×2Ñ2ˆàˆÜ˜dŸi™iÓ(ò    ‰DˆAˆqàAŠvØ"×5Ñ5°aÓ8Ð9‘Ü ¤7§<¡<Ô0Ø! $×"9Ñ"9¸!Ó"<Ð!=¸QÐ?‘ؐa’Ø  ×!8Ñ!8¸À4Ð!8Ó!HРIÐJ‘à  ×!8Ñ!8¸!¸ÀDÐ!8Ó!IРJÐKð×,Ñ,¨Q°°lÓCˆHؘ3ŠØ‘à#˜* B x jÐ1àAŠvÙ˜D“zà L‰L˜Õ ð+    ñ. Ø—7‘7˜5“>‰DðˆDàD—K‘K=     ¨$¨¨qÐ1Ð1rcó—|jj«}|jj«|d<|jj«|d<|jj«|d<|j
|d<|S)NrRr!r$r)Ú__dict__ÚcopyrRr!r$r)rÚrets  rÚ __getstate__zABCPolyBase.__getstate__ñsf€Øm‰m× Ñ Ó"ˆØ—i‘i—n‘nÓ&ˆˆF‰ ØŸ ™ ×(Ñ(Ó*ˆˆH‰ ØŸ ™ ×(Ñ(Ó*ˆˆH‰ ØŸ ™ ˆˆH‰ ؈
rcó—||_yr)rÀ)rÚdicts  rÚ __setstate__zABCPolyBase.__setstate__ùs    €Øˆ rcó—tj||j|j«}|j    ||j
«Sr)riÚ    mapdomainr!r$r9rR)rÚargs  rÚ__call__zABCPolyBase.__call__þs1€Ül‰l˜3 § ¡ ¨T¯[©[Ó9ˆØy‰y˜˜dŸi™iÓ(Ð(rcó,—t|j«Sr)ÚiterrRrs rÚ__iter__zABCPolyBase.__iter__s€ÜD—I‘I‹Ðrcó,—t|j«Sr)rQrRrs rÚ__len__zABCPolyBase.__len__s€Ü4—9‘9‹~Ðrcó|—|j|j |j|j|j«Sr©r_rRr!r$rrs rÚ__neg__zABCPolyBase.__neg__
s.€Ø~‰~Ø Y‰YˆJ˜Ÿ ™  T§[¡[°$·+±+ó
ð    
rcó—|Srr rs rÚ__pos__zABCPolyBase.__pos__s€Øˆ rcóì—|j|«}    |j|j|«}|j ||j |j|j«S#t$r    tcYSwxYwr)    rdr+rRÚ    ExceptionÚNotImplementedr_r!r$r©rrVÚ    othercoefrRs    rÚ__add__zABCPolyBase.__add__óe€Ø×*Ñ*¨5Ó1ˆ    ð    "Ø—9‘9˜TŸY™Y¨    Ó2ˆDð~‰~˜d D§K¡K°·±¸d¿k¹kÓJÐJøôò    "Ü!Ò !ð    "úó“A!Á!A3Á2A3cóì—|j|«}    |j|j|«}|j ||j |j|j«S#t$r    tcYSwxYwr)    rdr-rRrÖr×r_r!r$rrØs    rÚ__sub__zABCPolyBase.__sub__rÛrÜcóì—|j|«}    |j|j|«}|j ||j |j|j«S#t$r    tcYSwxYwr)    rdr/rRrÖr×r_r!r$rrØs    rÚ__mul__zABCPolyBase.__mul__"rÛrÜcóÀ—t|tj«rt|t«r$t    dt |«›dt |«›d«‚|j |«S)Nz&unsupported types for true division: 'z', 'ú')r^r´ÚNumberÚboolrbÚtypeÚ __floordiv__rUs  rÚ __truediv__zABCPolyBase.__truediv__*sZ€ô˜%¤§¡Ô0´J¸uÄdÔ4KÜðܘ“J<˜t¤D¨£K =°ð3óð ð× Ñ  Ó'Ð'rcóB—|j|«}|tur|S|dS©Nr©Ú
__divmod__rשrrVÚress   rræzABCPolyBase.__floordiv__5ó&€Øo‰o˜eÓ$ˆØ ”.Ñ  ØˆJؐ1‰vˆ rcóB—|j|«}|tur|S|dS©Nrrêrìs   rÚ__mod__zABCPolyBase.__mod__;rîrcóp—|j|«}    |j|j|«\}}|j ||j|j|j«}|j ||j|j|j«}||fS#t$r‚t$r    t
cYSwxYwr)
rdr1rRÚZeroDivisionErrorrÖr×r_r!r$r)rrVrÙÚquoÚrems     rrëzABCPolyBase.__divmod__Asœ€Ø×*Ñ*¨5Ó1ˆ    ð    "Ø—y‘y §¡¨IÓ6‰HˆCð
n‰n˜S $§+¡+¨t¯{©{¸D¿K¹KÓHˆØn‰n˜S $§+¡+¨t¯{©{¸D¿K¹KÓHˆØCˆxˆøô !ò    Ø Üò    "Ü!Ò !ð    "ús“BÂB5Â4B5cóº—|j|j||j¬«}|j||j|j
|j «}|S)N)r5)r6rRr5r_r!r$r)rrVrRrís    rÚ__pow__zABCPolyBase.__pow__MsC€Øy‰y˜Ÿ™ E°D·M±MˆyÓBˆØn‰n˜T 4§;¡;°· ± ¸T¿[¹[ÓIˆØˆ
rcóʗ    |j||j«}|j    ||j
|j |j«S#t$r    tcYSwxYwr)r+rRrÖr×r_r!r$r©rrVrRs   rÚ__radd__zABCPolyBase.__radd__RóU€ð    "Ø—9‘9˜U D§I¡IÓ.ˆDð~‰~˜d D§K¡K°·±¸d¿k¹kÓJÐJøôò    "Ü!Ò !ð    "úó‚AÁA"Á!A"cóʗ    |j||j«}|j    ||j
|j |j«S#t$r    tcYSwxYwr)r-rRrÖr×r_r!r$rrùs   rÚ__rsub__zABCPolyBase.__rsub__Yrûrücóʗ    |j||j«}|j    ||j
|j |j«S#t$r    tcYSwxYwr)r/rRrÖr×r_r!r$rrùs   rÚ__rmul__zABCPolyBase.__rmul__`rûrücó—tSr)r×rUs  rÚ __rtruediv__zABCPolyBase.__rtruediv__gs
€ôÐrcóB—|j|«}|tur|S|dSré©Ú __rdivmod__r×rìs   rÚ __rfloordiv__zABCPolyBase.__rfloordiv__ló(€Ø×јuÓ%ˆØ ”.Ñ  ØˆJؐ1‰vˆ rcóB—|j|«}|tur|S|dSrðrrìs   rÚ__rmod__zABCPolyBase.__rmod__rrrcóN—    |j||j«\}}|j ||j |j|j«}|j ||j |j|j«}||fS#t$r‚t$r    tcYSwxYwr)    r1rRrórÖr×r_r!r$r)rrVrôrõs    rrzABCPolyBase.__rdivmod__xsŒ€ð    "Ø—y‘y ¨¯    ©    Ó2‰HˆCð
n‰n˜S $§+¡+¨t¯{©{¸D¿K¹KÓHˆØn‰n˜S $§+¡+¨t¯{©{¸D¿K¹KÓHˆØCˆxˆøô !ò    Ø Üò    "Ü!Ò !ð    "ús‚B    Â    B$Â#B$cóÚ—t||j«xrÒtj|j|jk(«xr¤tj|j
|j
k(«xrv|j j|j jk(xrGtj|j |j k(«xr|j|jk(}|Sr)    r^r_rSrTr!r$rRÚshaperrìs   rÚ__eq__zABCPolyBase.__eq__ƒs°€Ü˜% §¡Ó0ò-܏v‰vd—k‘k U§\¡\Ñ1Ó2ò-äv‰vd—k‘k U§\¡\Ñ1Ó2ò-ð—    ‘    —‘ 5§:¡:×#3Ñ#3Ñ3ò-ôv‰vd—i‘i 5§:¡:Ñ-Ó.ò    -ð
— ‘ ˜uŸ|™|Ñ+ð      ð ˆ
rcó&—|j|« Sr)r rUs  rÚ__ne__zABCPolyBase.__ne__Œs€Ø—;‘;˜uÓ%Ð%Ð%rcóz—|j|j|j|j|j«S)zoReturn a copy.
 
        Returns
        -------
        new_series : series
            Copy of self.
 
        rÑrs rrÁzABCPolyBase.copy“s)€ð~‰~˜dŸi™i¨¯©°d·k±kÀ4Ç;Á;ÓOÐOrcó—t|«dz
S)u"The degree of the series.
 
        Returns
        -------
        degree : int
            Degree of the series, one less than the number of coefficients.
 
        Examples
        --------
 
        Create a polynomial object for ``1 + 7*x + 4*x**2``:
 
        >>> np.polynomial.set_default_printstyle("unicode")
        >>> poly = np.polynomial.Polynomial([1, 7, 4])
        >>> print(poly)
        1.0 + 7.0·x + 4.0·x²
        >>> poly.degree()
        2
 
        Note that this method does not check for non-zero coefficients.
        You must trim the polynomial to remove any trailing zeroes:
 
        >>> poly = np.polynomial.Polynomial([1, 7, 0])
        >>> print(poly)
        1.0 + 7.0·x + 0.0·x²
        >>> poly.degree()
        2
        >>> poly.trim().degree()
        1
 
        r)rQrs rÚdegreezABCPolyBase.degreežs€ô@4‹y˜1‰}Ðrcó*—|j|dz«S)a±Truncate series to the given degree.
 
        Reduce the degree of the series to `deg` by discarding the
        high order terms. If `deg` is greater than the current degree a
        copy of the current series is returned. This can be useful in least
        squares where the coefficients of the high degree terms may be very
        small.
 
        Parameters
        ----------
        deg : non-negative int
            The series is reduced to degree `deg` by discarding the high
            order terms. The value of `deg` must be a non-negative integer.
 
        Returns
        -------
        new_series : series
            New instance of series with reduced degree.
 
        r)Útruncate)rrDs  rÚcutdegzABCPolyBase.cutdegÀs€ð*}‰}˜S 1™WÓ%Ð%rcó¦—tj|j|«}|j||j|j
|j «S)a—Remove trailing coefficients
 
        Remove trailing coefficients until a coefficient is reached whose
        absolute value greater than `tol` or the beginning of the series is
        reached. If all the coefficients would be removed the series is set
        to ``[0]``. A new series instance is returned with the new
        coefficients.  The current instance remains unchanged.
 
        Parameters
        ----------
        tol : non-negative number.
            All trailing coefficients less than `tol` will be removed.
 
        Returns
        -------
        new_series : series
            New instance of series with trimmed coefficients.
 
        )riÚtrimcoefrRr_r!r$r)rÚtolrRs   rrgzABCPolyBase.trim×s9€ô({‰{˜4Ÿ9™9 cÓ*ˆØ~‰~˜d D§K¡K°·±¸d¿k¹kÓJÐJrcó—t|«}||k7s|dkr td«‚|t|j«k\r |j}n|jd|}|j    ||j
|j |j«S)aTruncate series to length `size`.
 
        Reduce the series to length `size` by discarding the high
        degree terms. The value of `size` must be a positive integer. This
        can be useful in least squares where the coefficients of the
        high degree terms may be very small.
 
        Parameters
        ----------
        size : positive int
            The series is reduced to length `size` by discarding the high
            degree terms. The value of `size` must be a positive integer.
 
        Returns
        -------
        new_series : series
            New instance of series with truncated coefficients.
 
        rzsize must be a positive integerN)ÚintrcrQrRr_r!r$r)rÚsizeÚisizerRs    rrzABCPolyBase.truncateîsp€ô(D“    ˆØ DŠ=˜E AšIÜÐ>Ó?Ð ?Ø ”C˜Ÿ    ™    “NÒ "Ø—9‘9‰Dà—9‘9˜V˜eÐ$ˆD؏~‰~˜d D§K¡K°·±¸d¿k¹kÓJÐJrcóž—|€ |j}|€ |j}|€ |j}||j|||j¬««S)aéConvert series to a different kind and/or domain and/or window.
 
        Parameters
        ----------
        domain : array_like, optional
            The domain of the converted series. If the value is None,
            the default domain of `kind` is used.
        kind : class, optional
            The polynomial series type class to which the current instance
            should be converted. If kind is None, then the class of the
            current instance is used.
        window : array_like, optional
            The window of the converted series. If the value is None,
            the default window of `kind` is used.
 
        Returns
        -------
        new_series : series
            The returned class can be of different type than the current
            instance and/or have a different domain and/or different
            window.
 
        Notes
        -----
        Conversion between domains and class types can result in
        numerically ill defined series.
 
        )r$r)r_r!r$Úidentityr)rr!Úkindr$s    rÚconvertzABCPolyBase.convert sL€ð: ˆ<Ø—>‘>ˆDØ ˆ>Ø—[‘[ˆFØ ˆ>Ø—[‘[ˆFِD—M‘M &°ÀÇ Á MÓLÓMÐMrcóV—tj|j|j«S)aÃReturn the mapping parameters.
 
        The returned values define a linear map ``off + scl*x`` that is
        applied to the input arguments before the series is evaluated. The
        map depends on the ``domain`` and ``window``; if the current
        ``domain`` is equal to the ``window`` the resulting map is the
        identity.  If the coefficients of the series instance are to be
        used by themselves outside this class, then the linear function
        must be substituted for the ``x`` in the standard representation of
        the base polynomials.
 
        Returns
        -------
        off, scl : float or complex
            The mapping function is defined by ``off + scl*x``.
 
        Notes
        -----
        If the current domain is the interval ``[l1, r1]`` and the window
        is ``[l2, r2]``, then the linear mapping function ``L`` is
        defined by the equations::
 
            L(l1) = l2
            L(r1) = r2
 
        )rirr!r$rs rrzABCPolyBase.mapparms0s€ô6{‰{˜4Ÿ;™;¨¯ © Ó4Ð4rrcóê—|j«\}}|€d}n|||zz}|j|j|||d|z «}|j||j|j
|j «S)aIntegrate.
 
        Return a series instance that is the definite integral of the
        current series.
 
        Parameters
        ----------
        m : non-negative int
            The number of integrations to perform.
        k : array_like
            Integration constants. The first constant is applied to the
            first integration, the second to the second, and so on. The
            list of values must less than or equal to `m` in length and any
            missing values are set to zero.
        lbnd : Scalar
            The lower bound of the definite integral.
 
        Returns
        -------
        new_series : series
            A new series representing the integral. The domain is the same
            as the domain of the integrated series.
 
        rgð?)rr?rRr_r!r$r)rr;r<r=rIr>rRs       rÚintegzABCPolyBase.integMsj€ð2—=‘=“?‰ˆˆSØ ˆ<؉Dà˜˜t™Ñ#ˆD؏y‰y˜Ÿ™ A q¨$°°S±Ó9ˆØ~‰~˜d D§K¡K°·±¸d¿k¹kÓJÐJrcóƗ|j«\}}|j|j||«}|j||j|j
|j «S)a§Differentiate.
 
        Return a series instance of that is the derivative of the current
        series.
 
        Parameters
        ----------
        m : non-negative int
            Find the derivative of order `m`.
 
        Returns
        -------
        new_series : series
            A new series representing the derivative. The domain is the same
            as the domain of the differentiated series.
 
        )rrArRr_r!r$r)rr;rIr>rRs     rÚderivzABCPolyBase.derivnsJ€ð$—=‘=“?‰ˆˆS؏y‰y˜Ÿ™ A sÓ+ˆØ~‰~˜d D§K¡K°·±¸d¿k¹kÓJÐJrcóŽ—|j|j«}tj||j|j
«S)a/Return the roots of the series polynomial.
 
        Compute the roots for the series. Note that the accuracy of the
        roots decreases the further outside the `domain` they lie.
 
        Returns
        -------
        roots : ndarray
            Array containing the roots of the series.
 
        )rLrRrirÈr$r!)rÚrootss  rr'zABCPolyBase.roots„s1€ð— ‘ ˜DŸI™IÓ&ˆÜ|‰|˜E 4§;¡;°· ± Ó<Ð<rcóp—|€ |j}tj|d|d|«}||«}||fS)aReturn x, y values at equally spaced points in domain.
 
        Returns the x, y values at `n` linearly spaced points across the
        domain.  Here y is the value of the polynomial at the points x. By
        default the domain is the same as that of the series instance.
        This method is intended mostly as a plotting aid.
 
        Parameters
        ----------
        n : int, optional
            Number of point pairs to return. The default value is 100.
        domain : {None, array_like}, optional
            If not None, the specified domain is used instead of that of
            the calling instance. It should be of the form ``[beg,end]``.
            The default is None which case the class domain is used.
 
        Returns
        -------
        x, y : ndarray
            x is equal to linspace(self.domain[0], self.domain[1], n) and
            y is the series evaluated at element of x.
 
        rr)r!rSÚlinspace)rÚnr!r8rCs     rr)zABCPolyBase.linspace“s>€ð0 ˆ>Ø—[‘[ˆFÜ K‰K˜˜q™     6¨!¡9¨aÓ 0ˆÙ ‹GˆØ!ˆtˆ rc
óŽ—|€;tj|«}|d|dk(rE|dxxdzcc<|dxxdz cc<n*t|t«rt    |«dk(r |j
}|€ |j }tj|||«}
|j|
|||||¬«} |r| \} } || |||    ¬«| fS| } || |||    ¬«S)aê Least squares fit to data.
 
        Return a series instance that is the least squares fit to the data
        `y` sampled at `x`. The domain of the returned instance can be
        specified and this will often result in a superior fit with less
        chance of ill conditioning.
 
        Parameters
        ----------
        x : array_like, shape (M,)
            x-coordinates of the M sample points ``(x[i], y[i])``.
        y : array_like, shape (M,)
            y-coordinates of the M sample points ``(x[i], y[i])``.
        deg : int or 1-D array_like
            Degree(s) of the fitting polynomials. If `deg` is a single integer
            all terms up to and including the `deg`'th term are included in the
            fit. For NumPy versions >= 1.11.0 a list of integers specifying the
            degrees of the terms to include may be used instead.
        domain : {None, [beg, end], []}, optional
            Domain to use for the returned series. If ``None``,
            then a minimal domain that covers the points `x` is chosen.  If
            ``[]`` the class domain is used. The default value was the
            class domain in NumPy 1.4 and ``None`` in later versions.
            The ``[]`` option was added in numpy 1.5.0.
        rcond : float, optional
            Relative condition number of the fit. Singular values smaller
            than this relative to the largest singular value will be
            ignored. The default value is ``len(x)*eps``, where eps is the
            relative precision of the float type, about 2e-16 in most
            cases.
        full : bool, optional
            Switch determining nature of return value. When it is False
            (the default) just the coefficients are returned, when True
            diagnostic information from the singular value decomposition is
            also returned.
        w : array_like, shape (M,), optional
            Weights. If not None, the weight ``w[i]`` applies to the unsquared
            residual ``y[i] - y_hat[i]`` at ``x[i]``. Ideally the weights are
            chosen so that the errors of the products ``w[i]*y[i]`` all have
            the same variance.  When using inverse-variance weighting, use
            ``w[i] = 1/sigma(y[i])``.  The default value is None.
        window : {[beg, end]}, optional
            Window to use for the returned series. The default
            value is the default class domain
        symbol : str, optional
            Symbol representing the independent variable. Default is 'x'.
 
        Returns
        -------
        new_series : series
            A series that represents the least squares fit to the data and
            has the domain and window specified in the call. If the
            coefficients for the unscaled and unshifted basis polynomials are
            of interest, do ``new_series.convert().coef``.
 
        [resid, rank, sv, rcond] : list
            These values are only returned if ``full == True``
 
            - resid -- sum of squared residuals of the least squares fit
            - rank -- the numerical rank of the scaled Vandermonde matrix
            - sv -- singular values of the scaled Vandermonde matrix
            - rcond -- value of `rcond`.
 
            For more details, see `linalg.lstsq`.
 
        rr)ÚwrErF©r!r$r)    riÚ    getdomainr^ÚlistrQr!r$rÈrG)r¢r8rCrDr!rErFr,r$rÚxnewrírRÚstatuss              rÚfitzABCPolyBase.fit±s׀ðJ ˆ>Ü—\‘\ !“_ˆFؐa‰y˜F 1™IÒ%ؐq“    ˜Q‘“    Øq“    ˜Q‘”    Ü ˜¤Ô %¬#¨f«+¸Ò*:Ø—Z‘ZˆFà ˆ>Ø—Z‘ZˆFä|‰|˜A˜v vÓ.ˆØh‰ht˜Q  q°¸DˆhÓAˆÙ Ø ‰NˆT6áD °¸vÔFÈðð ðˆDِt F°6À&ÔIÐ Ircót—tj|gd¬«\}|€tj|«}n*t|t«rt |«dk(r |j }|€ |j}t |«}tj||«\}}|||zz}|j|«||zz }    ||    |||¬«S)a”Return series instance that has the specified roots.
 
        Returns a series representing the product
        ``(x - r[0])*(x - r[1])*...*(x - r[n-1])``, where ``r`` is a
        list of roots.
 
        Parameters
        ----------
        roots : array_like
            List of roots.
        domain : {[], None, array_like}, optional
            Domain for the resulting series. If None the domain is the
            interval from the smallest root to the largest. If [] the
            domain is the class domain. The default is [].
        window : {None, array_like}, optional
            Window for the returned series. If None the class window is
            used. The default is None.
        symbol : str, optional
            Symbol representing the independent variable. Default is 'x'.
 
        Returns
        -------
        new_series : series
            Series with the specified roots.
 
        Frfrr-)
rirjr.r^r/rQr!r$rrO)
r¢r'r!r$rrDrIr>ÚrnewrRs
          rÚ    fromrootszABCPolyBase.fromroots sª€ô8—,‘, ˜w¨UÔ3‰ˆØ ˆ>Ü—\‘\ %Ó(‰FÜ ˜¤Ô %¬#¨f«+¸Ò*:Ø—Z‘ZˆFà ˆ>Ø—Z‘ZˆFä%‹jˆÜ—;‘;˜v vÓ.‰ˆˆSؐS˜5‘[Ñ ˆØ~‰~˜dÓ# c¨3¡hÑ.ˆÙ4 ¨v¸fÔEÐErcó¦—|€ |j}|€ |j}tj||«\}}|j    ||«}|||||«S)aŸIdentity function.
 
        If ``p`` is the returned series, then ``p(x) == x`` for all
        values of x.
 
        Parameters
        ----------
        domain : {None, array_like}, optional
            If given, the array must be of the form ``[beg, end]``, where
            ``beg`` and ``end`` are the endpoints of the domain. If None is
            given then the class domain is used. The default is None.
        window : {None, array_like}, optional
            If given, the resulting array must be if the form
            ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
            the window. If None is given then the class window is used. The
            default is None.
        symbol : str, optional
            Symbol representing the independent variable. Default is 'x'.
 
        Returns
        -------
        new_series : series
             Series of representing the identity.
 
        )r!r$rirrJ)r¢r!r$rrIr>rRs       rrzABCPolyBase.identity7sU€ð6 ˆ>Ø—Z‘ZˆFØ ˆ>Ø—Z‘ZˆFÜ—;‘;˜v vÓ.‰ˆˆS؏y‰y˜˜cÓ"ˆÙ4˜ ¨Ó0Ð0rcó —|€ |j}|€ |j}t|«}||k7s|dkr td«‚|dg|zdgz|||«S)a;Series basis polynomial of degree `deg`.
 
        Returns the series representing the basis polynomial of degree `deg`.
 
        Parameters
        ----------
        deg : int
            Degree of the basis polynomial for the series. Must be >= 0.
        domain : {None, array_like}, optional
            If given, the array must be of the form ``[beg, end]``, where
            ``beg`` and ``end`` are the endpoints of the domain. If None is
            given then the class domain is used. The default is None.
        window : {None, array_like}, optional
            If given, the resulting array must be if the form
            ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
            the window. If None is given then the class window is used. The
            default is None.
        symbol : str, optional
            Symbol representing the independent variable. Default is 'x'.
 
        Returns
        -------
        new_series : series
            A series with the coefficient of the `deg` term set to one and
            all others zero.
 
        rz deg must be non-negative integerr)r!r$rrc)r¢rDr!r$rÚidegs      rÚbasiszABCPolyBase.basisZs`€ð: ˆ>Ø—Z‘ZˆFØ ˆ>Ø—Z‘ZˆFܐ3‹xˆà 3Š;˜$ š(ÜÐ?Ó@Ð @ِA3˜‘:  Ñ# V¨V°VÓ<Ð<rcó`—|€ |j}|€ |j}|j|||«S)a©Convert series to series of this class.
 
        The `series` is expected to be an instance of some polynomial
        series of one of the types supported by by the numpy.polynomial
        module, but could be some other class that supports the convert
        method.
 
        Parameters
        ----------
        series : series
            The series instance to be converted.
        domain : {None, array_like}, optional
            If given, the array must be of the form ``[beg, end]``, where
            ``beg`` and ``end`` are the endpoints of the domain. If None is
            given then the class domain is used. The default is None.
        window : {None, array_like}, optional
            If given, the resulting array must be if the form
            ``[beg, end]``, where ``beg`` and ``end`` are the endpoints of
            the window. If None is given then the class window is used. The
            default is None.
 
        Returns
        -------
        new_series : series
            A series of the same kind as the calling class and equal to
            `series` when evaluated.
 
        See Also
        --------
        convert : similar instance method
 
        )r!r$r )r¢Úseriesr!r$s    rÚcastzABCPolyBase.casts4€ðD ˆ>Ø—Z‘ZˆFØ ˆ>Ø—Z‘ZˆF؏~‰~˜f c¨6Ó2Ð2rr)NNr8)F)r)NNN)r)rN)NNFNNr8)NN)]rsÚ
__module__Ú __qualname__Ú__doc__Ú__hash__Ú__array_ufunc__r5rÚ    maketransÚ_superscript_mappingr ÚosrtrÚpropertyrÚabcÚabstractmethodr!r$r&Ú staticmethodr+r-r/r1r6r9r?rArGrJrLrOrWrYr\r`rdrmrurrzr{Ú classmethodr}r|r©r¬rÚfloatrŽr¾rÃrÆrÊrÍrÏrÒrÔrÚrÞràrçrærñrër÷rúrþrrrr    rr rrÁrrrgrr rr#r%r'r)r2r5rr9r<r rrrrs„ñ/ðd€Hð€Oð€HðŸ=™=Ø Ø Ø Ø Ø Ø Ø Ø Ø Ø ñ *ó ÐðŸ™Ø Ø Ø Ø Ø Ø Ø Ø Ø Ø ñ (ó Ðð —w‘w $‘Ð&€Là ñóððØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ñò óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ðØ×Ññ óóð ò
ò&3ò 3ò 1ò "óHò<,ò =ò;ò
,ð\ñ  óð  ðñ
3óð
3ðñ:óð:ðò@óð@ð
"¨(ð"¸ð"Àuó"ò&&2òTòò
)òòò
 
ò
òKòKòKò    (òò ò
òò
KòKòKòò
ò ò     òò&ò    Pò òD&ó.Kò.Kó:#NòJ5ð:˜2 DóKóBKò, =óð<ØCGØòXJóðXJðtØ%'°¸Sò(Fóð(FðTò 1óð 1ðDò$=óð$=ðLò%3óñ%3r)r?rFr´rDÚcollections.abcrÚnumpyrSrwrriÚ__all__ÚABCrr rrú<module>rOs7ðñó ÛÛ    Ý$ãåà ˆ/€ôS3#—'‘'õS3r