+
    ei  c                   sN   R t ^ RIt^ RIHt ^ RIHt ^ RIHtH	t	H
t
  ! R R4      t ! R R4      t]P                  P                  R]P                  ! . ROR	R
7      ]! . RO4      34       ! R R4      4       t ! R R4      t ! R R4      t ! R R4      tR tR tR tR tR tR# )zE
Tests related to the ``symbol`` attribute of the ABCPolyBase class.
N)array)assert_assert_equalassert_raisesc                   s   a  ] tR t^t o Rt. ROtR t]P                  P                  RR]
3R]
3R]3^]334      R 4       t]P                  P                  RR4      R 4       tR	 tR
 tRtV tR# )TestInitz-
Test polynomial creation with symbol kwarg.
c                sr    \         P                  ! V P                  4      p\        VP                  R 4       R# )xNpoly
Polynomialcr   symbolselfp   & I/usr/lib64/python3.14/site-packages/numpy/polynomial/tests/test_symbol.pytest_default_symbolZTestInit.test_default_symbol   s"    OODFF#QXXs#    Z Z3Nc                s    \         P                  ! V4      ;_uu_ 4        \        P                  ! V P                  VR 7      pRRR4       R#   + '       g   i     R# ; i)r
   N)pytestraisesr   r   r	   )r   	bad_input	exceptionr   s   &&& r   test_symbol_bad_inputZTestInit.test_symbol_bad_input   s6     ]]9%%y9A &%%%s   #AA	r
   c                sv    \         P                  ! V P                  VR7      p\        VP                  V4       R# )z6
Values for symbol that should pass input validation.
r   Nr   )r   r
   r      && r   test_valid_symbolsZTestInit.test_valid_symbols    s&     OODFF62QXXv&r   c                s    \         P                  ! V P                  RR7      p\        P                  ! \
        4      ;_uu_ 4        RVn        RRR4       R#   + '       g   i     R# ; i)z"
'symbol' attribute is read only.
r   r   zN)r   r   r	   r   r   ZAttributeErrorr
   r   r   r   test_propertyZTestInit.test_property.   s=     OODFF3/]]>**AH +***s   AA(	c                s    \         P                  ! V P                  R R7      p\         P                  ! VP                  RR7      p\	        VP
                  R4       R# )yr   tN)r   r   r	   Zcoefr   r
   )r   r   Zpts   &  r   test_change_symbolZTestInit.test_change_symbol6   s8    OODFF3/__QVVC0RYY$r             )r   r   )r   Zx_1ZAZxyzu   β)__name__
__module____qualname____firstlineno____doc__r	   r   r   markparametrize
ValueErrorZ	TypeErrorr   r   r   r   __static_attributes____classdictcell__Z__classdict__   @r   r   r      s      	A$ [[7	Z	j	y	
I	: :: [[X ( ''% %r   r   c                   sd   a  ] tR t^=t o ]P
                  ! . R	ORR7      tR tR tR t	R t
RtV tR# )
TestUnaryOperatorsr   r   c                sL    V P                   ) p\        VP                  R 4       R# r   Nr   r   r
   )r   Znr   r   test_negZTestUnaryOperators.test_neg@   s    VVGQXXs#r   c                sX    V P                   ^
,          p\        VP                  R4       R# 
   r   Nr2   r   outr   r   test_scalarmulZ!TestUnaryOperators.test_scalarmulD   s    ffrkSZZ%r   c                sX    ^
V P                   ,          p\        VP                  R4       R# r4   r2   r6   r   r   test_rscalarmulZ"TestUnaryOperators.test_rscalarmulH   s    466kSZZ%r   c                sX    V P                   ^,          p\        VP                  R4       R# )r#   r   Nr2   r6   r   r   test_powZTestUnaryOperators.test_powL   s    ffkSZZ%r   r   Nr    )r$   r%   r&   r'   r   r   r   r3   r8   r9   r:   r,   r-   r.   r/   r   r0   r0   =   s.     	#.A$&&& &r   r0   rhsr   r   c                   s   a  ] tR t^Qt o Rt]P                  ! . RORR7      tR tR t	R t
R tR tR	 tR
 tR tRtV tR# )TestBinaryOperatorsSameSymbolzW
Ensure symbol is preserved for numeric operations on polynomials with
the same symbol
r   r   c                sX    V P                   V,           p\        VP                  R 4       R# r1   r2   r   r;   r7   r   r   test_addZ&TestBinaryOperatorsSameSymbol.test_add_       ffslSZZ%r   c                sX    V P                   V,
          p\        VP                  R 4       R# r1   r2   r=   r   r   test_subZ&TestBinaryOperatorsSameSymbol.test_subc   r?   r   c                sX    V P                   V,          p\        VP                  R 4       R# r1   r2   r=   r   r   test_polymulZ*TestBinaryOperatorsSameSymbol.test_polymulg   r?   r   c                sl    \        V P                  V4       F  p\        VP                  R 4       K  	  R# r1   Zdivmodr   r   r
   r=   r   r   test_divmodZ)TestBinaryOperatorsSameSymbol.test_divmodk   s%    $&&#&CS) 'r   c                sV    WP                   ,           p\        VP                  R 4       R# r1   r2   r=   r   r   	test_raddZ'TestBinaryOperatorsSameSymbol.test_raddo       FFlSZZ%r   c                sV    WP                   ,
          p\        VP                  R 4       R# r1   r2   r=   r   r   	test_rsubZ'TestBinaryOperatorsSameSymbol.test_rsubs   rE   r   c                sV    WP                   ,          p\        VP                  R 4       R# r1   r2   r=   r   r   	test_rmulZ'TestBinaryOperatorsSameSymbol.test_rmulw   rE   r   c                sj    \        WP                  4       F  p\        VP                  R 4       K  	  R# r1   rB   r=   r   r   test_rdivmodZ*TestBinaryOperatorsSameSymbol.test_rdivmod{   s#    #vv&CS) 'r   r   Nr    )r$   r%   r&   r'   r(   r   r   r   r>   r@   rA   rC   rD   rF   rG   rH   r,   r-   r.   r/   r   r<   r<   Q   sI      		#.A&&&*&&&* *r   r<   c                   s.  a  ] tR t^t o ]P
                  ! . RORR7      t]P
                  ! . R	ORR7      t]P                  ]P                  ]P                  ]P                  ]P                  3t]P                  P!                  R]4      R 4       tRtV tR# )
"TestBinaryOperatorsDifferentSymbolr   r   r   fc                s:    \        \        WP                  4       R # )N)r   r+   other)r   rJ   s   &&r   test_binops_failsZ4TestBinaryOperatorsDifferentSymbol.test_binops_fails   s    j!ZZ0r   r   Nr    i      i   )r$   r%   r&   r'   r   r   r   rK   Z__add__Z__sub__Z__mul__Z__floordiv__Z__mod__Zopsr   r)   r*   rL   r,   r-   r.   r/   r   rI   rI      sl     	#.AOOIc2E99aiiANNAII
FC[[S#&1 '1r   rI   c                   sX   a  ] tR t^t o ]P
                  ! . RORR7      tR tR tRt	V t
R# )TestEqualityr   r   c                sj    \         P                  ! . RORR7      p\        V P                  V8H  4       R# )r!   r   r   Nr    r   r   r   r   r   rK   r   r   test_eqZTestEquality.test_eq   s"    	#6% r   c                sl    \         P                  ! . RORR7      p\        V P                  V8X  * 4       R# )r!   r   r   Nr    rP   rQ   r   r   test_neqZTestEquality.test_neq   s#    	#6DFFe#$r   r   Nr    )r$   r%   r&   r'   r   r   r   rR   rS   r,   r-   r.   r/   r   rO   rO      s$     	#.A!% %r   rO   c                   s   a  ] tR t^t o Rt]P                  ! . RORR7      tR tR t	R t
]P                  P                  RRR^
./R	R^
./R
]P                  /34      R 4       tR tR tRtV tR# )TestExtraMethodszB
Test other methods for manipulating/creating polynomial objects.
r   r   c                f    V P                   P                  4       p\        VP                  R 4       R# r1   )r   Zcopyr   r
   rQ   r   r   	test_copyZTestExtraMethods.test_copy       U\\3'r   c                rU   r1   )r   Ztrimr   r
   rQ   r   r   	test_trimZTestExtraMethods.test_trim   rW   r   c                sh    V P                   P                  ^4      p\        VP                  R4       R# )r"   r   N)r   Ztruncater   r
   rQ   r   r   test_truncateZTestExtraMethods.test_truncate   s"    "U\\3'r   kwargdomainwindowZkindc                sj    V P                   P                  ! R/ VB p\        VP                  R 4       R# )r   Nr   )r   Zconvertr   r
   )r   rZ   rK   r   r   test_convertZTestExtraMethods.test_convert   s'     ''U\\3'r   c                rU   r1   )r   Zintegr   r
   rQ   r   r   
test_integZTestExtraMethods.test_integ       U\\3'r   c                rU   r1   )r   Zderivr   r
   rQ   r   r   
test_derivZTestExtraMethods.test_deriv   r_   r   r   N)r!   r"   r#       i)r$   r%   r&   r'   r(   r   r   r   rV   rX   rY   r   r)   r*   Z	Chebyshevr]   r^   r`   r,   r-   r.   r/   r   rT   rT      s      	S1A((( [[W	C9	C9	 ' 
(
((( (r   rT   c                  s    \         P                  ! . RORR7      p \         P                  ! . RORR7      pV ! V4      pVP                  R8X  g   Q hR# )r#   r   r   u   λ_1N)r#   r"   r!   )rN   r!   ra   )r   r   r
   )r   ZqZr      r   test_compositionrd      s=    	#.Af5A	!A88vr   c                  s    \        ^
4      3^,          w  r\        P                  P                  W^RR7      p\	        VP
                  R4       R# )r5   r   )Zdegr
   N)Zranger   r   Zfitr   r
   )r   r   r   rc   r   test_fitre      s=    "I<!DAAa4A3r   c                  s|    R^.p \         P                  P                  V RR7      p\        VP                  R4       R# )r"   r   r   Ni)r   r   Z	fromrootsr   r
   )Zrootsr   s     r   test_froomrootsrf      s2    GE!!%!4A3r   c                  s~    \         P                  P                  R^.^^.RR7      p \        V P                  R4       R# )r!   r   )r[   r\   r
   Nrb   )r   r   Zidentityr   r
   r       r   test_identityri      s3      QB LA3r   c                  st    \         P                  P                  ^RR7      p \        V P                  R4       R# )r#   r   r   N)r   r   Zbasisr   r
   rg   rh   r   
test_basisrj      s)    a,A3r   rM   )r(   r   Znumpy.polynomialZ
polynomialr   Znumpy._corer    Znumpy.testingr   r   r   r   r0   r)   r*   r   r<   rI   rO   rT   rd   re   rf   ri   rj   r   r   r   <module>rk      s       > >.% .%b& &( 		#.i%* %*%*P1 1	% 	%!( !(H   
 r   