+
    :i*                     2   R t ^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
HtHt ^ RIHt ^ RIHtHtHt ]! ]P&                  4      R 4       t]! ]P*                  4      R	 4       t]! ]P.                  4      RR l4       tR tR t]! ]P6                  4      R 4       t]! ]P:                  4      R 4       t]! ]P>                  4      R 4       t ]! ]PB                  R
R7      RR l4       t"]! ]PF                  4      RR l4       t$]! ]PJ                  4      R 4       t&R# )z5
Implementation of operations involving polynomials.
N)
polynomial)	polyutils)literal_unroll)typeserrors)overload)type_can_asarrayas_dtype
from_dtypec                    a \        V R V 4      p\        V\        P                  4      '       d   \        P
                  oM\        V4      oV3R lpV# )dtypec                 $  < \        V P                  4      ^8w  d   \        R4      h\        P                  ! V 4      ^ ,          p\        V4      ^ 8X  d   \        P
                  ! ^ SR7      # \        V 4      VR,          ,
          ^,
          pV \        V^ ,          4      \        VR,          4      ^,            p \        V 4      pV^8  dz   \        P                  ! \        P                  ! V^,
          3S4      ^4      P                  pV R,          ) V ^ ,          ,          VR&   \        P                  P                  V4      pM\        P
                  ! ^ SR7      pV^ 8  d/   \        P                  ! V\        P
                  ! VSR7      34      # V# )   zInput must be a 1d array.r   r   NN)    :NNN)lenshape
ValueErrornpnonzerozerosintdiagonesTlinalgeigvalshstack)pnon_zerotznArootscast_ts   &     f/var/www/html/photoedit/myenv/lib/python3.14/site-packages/numba/np/polynomial/polynomial_functions.py
roots_implroots_impl.<locals>.roots_impl   s-    qww<1899::a=#x=A88AV,,Vhrl"Q& c(1+s8B<0145Fq5 Q&11577AufqtmAdGII%%a(EHHQf-E 699eRXXb%?@AAL    )getattr
isinstancer   Integerr   float64r	   )r    tyr(   r&   s   &  @r'   r(   r(      sD    
 
GQ	B"emm$$" D r*   c                 @   \        V 4      '       g   R p\        P                  ! V4      h\        V \        P
                  4      '       d   Rp\        P                  ! W,          4      h\        P                  ! V 4      ^8  d   Rp\        P                  ! V4      hR pV# )z%The argument "seq" must be array-likez&Unsupported type %r for argument "seq"Coefficient array is not 1-dc                     \        V 4      ^ 8X  d   V # \        \        V 4      ^,
          RR4       F  pW,          ^ 8w  g   K   M	  V RX^,            # )r   Nr   )r   range)seqis   & r'   implpolyutils_trimseq.<locals>.implN   sK    s8q=J3s8a<R06Q; 1 vA;r*   )	r   r   TypingErrorr,   r   	BaseTupler   ndimNumbaValueError)r4   msgr6   s   &  r'   polyutils_trimseqr=   @   s~    C  5  %%#u''6  --	wws|a,$$S)) Kr*   Tc           
        aaa \        V 4      '       g   R p\        P                  ! V4      h\        V\        \
        P                  34      '       g   Rp\        P                  ! V4      h\        P                  o\        V \
        P                  4      o\        V \
        P                  4      oS'       dx   \        P                  ! \        P                  ! V  Uu. uF  p\        P                  ! V4      ^8  NK  	  up4      4      '       d   \        P                  ! R4      h\        V !  oMS'       d;   \!        \#        V 4      4      p\        P$                  ! V\        P                  4      oM\\        P                  ! V 4      ^8:  d,   \        P$                  ! S\!        V P&                  4      4      oM\        P                  ! R4      hRVVV3R llpV# u upi )z'The argument "alist" must be array-likez#The argument "trim" must be booleanr1   c                   < S	'       d^   . p\        V 4       FK  pVP                  \        P                  ! \        P                  ! V4      4      P                  S4      4       KM  	  MS'       dJ   V  Uu. uF<  p\        P                  ! \        P                  ! V4      4      P                  S4      NK>  	  ppM^\        P                  ! V 4      pV Uu. uF<  p\        P                  ! \        P                  ! V4      4      P                  S4      NK>  	  pp\        V Uu. uF  qDP                  NK  	  up4      ^ 8X  d   \        R4      hV'       d&   V Uu. uF  p\        P                  ! V4      NK  	  ppTpV# u upi u upi u upi u upi )r   zCoefficient array is empty)r   appendr   
atleast_1dasarrayastypeminsizer   putrimseq)
alisttrimarraysitema	alist_arrret
list_input	res_dtypetuple_inputs
   &&     r'   r6   !polyutils_as_series.<locals>.imply   s;   F&u-bmmBJJt,<=DDYOP . $&$! mmBJJqM299)D$  &F 

5)I(*(! mmBJJqM299)D(  * '1'(A-9::-34VbjjmVF4
&
* ( 5s   3AE;AF FF
T)r   r   r8   r,   boolr   Booleanr   r.   r9   Listanyarrayr:   r;   _poly_result_dtyper	   _get_list_typeresult_typer   )	rH   rI   r<   rL   dtr6   rO   rP   rQ   s	   &&    @@@r'   polyutils_as_seriesr]   Z   sG   E""7  %%dT5==1223  %%

IUEOO4KE5::.J66"((E:EqBGGAJNE:;<<(()GHH&.		nU+,NN2rzz2	 775>Qy(5;;2GHI (()GHH 0 KQ ;s   "Gc                     V P                   p\        V\        P                  4      '       g   \	        V4      '       d   \        V4      # V# N)r   r,   r   Numberr   rZ   )lr\   s   & r'   rZ   rZ      s9     
Br5<<((.>r.B.Bb!!	r*   c                     \         P                  pV  EF  p\        V\        P                  4      '       d   VP                  pM\        V\        P
                  4      '       d   \        V4      .pMj\        V\        P                  4      '       d   V.pMF\        V\        P                  4      '       d   VP                  .pMR p\        P                  ! V4      h V Uu. uF  p\        V4      NK  	  ppVP                  V4       \         P                  ! V!  pEK  	  \!        V4      # u upi   \        P                   d    Rp\        P                  ! T4      hi ; i)zInput dtype must be scalarzInput dtype must be scalar.)r   r.   r,   r   r9   rV   rZ   r`   Arrayr   r   r8   r	   r@   r[   NumbaNotImplementedErrorr
   )argsrP   rK   s1r<   tra   s   *      r'   rY   rY      s    

IdEOO,,Bejj)) &'Bell++Bekk****B.C$$S))	*&()b!bA)HHY+I! * i   * .. 	*/C$$S))	*s   D0 D+4'D0+D00.Ec                     \        V 4      '       g   R p\        P                  ! V4      h\        V4      '       g   Rp\        P                  ! V4      hR pV# )$The argument "c1" must be array-like$The argument "c2" must be array-likec                 x   \         P                  ! W34      w  r#\        V4      \        V4      ,
          pV^ 8  d.   \        P                  ! V4      p\        P
                  ! W%34      pV^ 8  d/   \        P                  ! V) 4      p\        P
                  ! W534      pW#,           p\         P                  ! V4      # r   rF   	as_seriesr   r   r   concatenaterG   c1c2arr1arr2diffzrvals   &&     r'   r6   numpy_polyadd.<locals>.impl       \\2(+
4y3t9$!8$B>>4*-D!84%B>>4*-Dkzz#r*   r   r   r8   rq   rr   r<   r6   s   &&  r'   numpy_polyaddr|      P    B4  %%B4  %%
 Kr*   c                     \        V 4      '       g   R p\        P                  ! V4      h\        V4      '       g   Rp\        P                  ! V4      hR pV# )ri   rj   c                 x   \         P                  ! W34      w  r#\        V4      \        V4      ,
          pV^ 8  d.   \        P                  ! V4      p\        P
                  ! W%34      pV^ 8  d/   \        P                  ! V) 4      p\        P
                  ! W534      pW#,
          p\         P                  ! V4      # rl   rm   rp   s   &&     r'   r6   numpy_polysub.<locals>.impl   ry   r*   rz   r{   s   &&  r'   numpy_polysubr      r}   r*   c                     \        V 4      '       g   R p\        P                  ! V4      h\        V4      '       g   Rp\        P                  ! V4      hR pV# )ri   rj   c                     \         P                  ! W34      w  r#\        P                  ! W#4      p\         P                  ! V4      # r_   )rF   rn   r   convolverG   )rq   rr   rs   rt   rw   s   &&   r'   r6   numpy_polymul.<locals>.impl   s0    \\2(+
kk$%zz#r*   rz   r{   s   &&  r'   numpy_polymulr      sP    B4  %%B4  %%
 Kr*   )prefer_literalc                 `  aaaa \        V 4      '       g   R p\        P                  ! V4      h\        V4      '       g   Rp\        P                  ! V4      h\        V\        \
        P                  34      '       g   Rp\        P                  ! V4      h\        W4      o\        V \
        P                  4      '       * oRo\        V \
        P                  4      '       d   R\        P                  ! V 4      ,          o\        V\        4      '       d   VoMVP                  oRVVVV3R llpV# )z#The argument "x" must be array-like#The argument "c" must be array-likez%The argument "tensor" must be booleanc                   < \         P                  ! V4      P                  S	4      p\         P                  ! V 4      P                  S	4      pS'       d+   S
'       d#   VP                  VP                  S,           4      p\        V4      pW5^,
          ,          V^ ,          ,           p\        V^,
          ^ R4       F  pW7^,
          ,          Wd,          ,           pK!  	  V# )r   r   )r   rB   rC   reshaper   r   r3   )xctensorarrinputsra   yr5   	new_shaperP   
tensor_arg
x_nd_arrays   &&&     r'   r6   poly_polyval.<locals>.impl  s    jjm""9-A%%i0*++cii)34CHAJ!#q1ua$AE
QZ'A % r*   r   rS   )r   r   r8   r,   rT   r   BooleanLiteralRequireLiteralValuerY   r`   rc   r   r:   literal_value)	r   r   r   r<   r6   r   rP   r   r   s	   &&&  @@@@r'   poly_polyvalr      s    A3  %%A3  %%ftU%9%9:;;5((--"1(I
  5<<00JI!U[[!!2771:%	&$
))
  Kr*   c                   aa \        V 4      '       g   R p\        P                  ! V4      h\        V\        \
        P                  34      '       g   Rp\        P                  ! V4      h\        \        V 4      4      o\        P                  ! S\        P                  4      '       g   RS R2p\        P                  ! V4      h\        P                  ! V 4      ^8H  ;'       gW    \        V \
        P                  \
        P                  34      ;'       d%    \        V P                  \
        P                   4      oRVV3R llpV# )r   z#The argument "m" must be an integerz"Input dtype must be scalar. Found z insteadc                   < \         P                  ! V 4      P                  S4      p V P                  p\	        V4       F  p\        V 4      p\         P                  ! V^,           3V P                  R,          ,           VR7      pV ^ ,          ^ ,          V^ &   V ^ ,          V^&   \	        ^V4       F"  pW,          V^,           ,          WV^,           &   K$  	  Tp K  	  S'       d   \        P                  ! V 4      # V # )r   r   r   )
r   rB   rC   r   r3   r   emptyr   rF   rG   )	r   mcdtr5   r#   tmpjis1DrP   s	   &&     r'   r6   poly_polyint.<locals>.implB  s    JJqM  +ggqAAA((AE8aggbk1=CqTAXCFqTCF1a[TQU^E
 !A  ::a= Hr*   r   )r   r   r8   r,   r   r   r-   r	   rY   r   
issubdtypenumberr:   rV   r9   r   r`   )r   r   r<   r6   r   rP   s   &&  @@r'   poly_polyintr   -  s     A3  %%a#u}}-..3  %%+A./I==BII..29+XF  %%WWQZ1_ 4 4EJJ89 3 3AGGU\\2 	 " Kr*   c                     \        V 4      '       g   R p\        P                  ! V4      h\        V4      '       g   Rp\        P                  ! V4      hR pV# )ri   rj   c                 2   \         P                  ! W34      w  r#VR,          ^ 8X  d   \        4       h\        V4      p\        V4      pWE8  d   VR,          ^ ,          V3# V^8X  d    W#R,          ,          VR,          ^ ,          3# WE,
          pVR,          pVRR V,          pTpV^,
          p	V^ 8  d3   W(V	;;; W2V	,          ,          ,          uuu% V^,          pV	^,          p	K9  W)^,           R V,          \         P                  ! VRV	^,            4      3# )r   :Nr   NNr   )rF   rn   ZeroDivisionErrorr   rG   )
rq   rr   rs   rt   l1l2dlensclr5   r   s
   &&        r'   r6   numpy_polydiv.<locals>.impl`  s    \\2(+
8q=#%%YY78a<%%1Wr(?DHqL007Dr(C9s?DAQAq&q	TG^+	QQA<#%rzz$vA,'???r*   rz   r{   s   &&  r'   numpy_polydivr   V  sQ    B4  %%B4  %%@. Kr*   rS   r   )'__doc__numpyr   numpy.polynomialr   polyr   rF   numbar   
numba.corer   r   numba.core.extendingr   numba.np.numpy_supportr   r	   r
   r%   r(   rG   r=   rn   r]   rZ   rY   polyaddr|   polysubr   polymulr   polyvalr   polyintr   polydivr    r*   r'   <module>r      s9  
  / ,   $ ) I I 
"((, ,^ 
"** 2 
",,6 6r!8 
$,, 0 
$,, 0 
$,, " 
$,,t,+ -+\ 
$,,% %P 
$,,   r*   