
    (ph                      J    S SK rS SKrS SKJrJr  S SKJr   " S S5      r	S r
g)    N)assert_allclosesuppress_warningsc                       \ rS rSr\R
                  R                  S 5       r\R
                  R                  S/ SQ5      \R
                  R                  S/ SQ5      S 5       5       r	Sr
g	)
TestSphHarm   c                    SnSn[         R                  " S[         R                  5      n[         R                  " SS[         R                  -  5      n[         R                  " X45      u  p4[        R
                  " X!X4SS9u  pVn[        R                  " X!USS9u  pn
[         R                  " [         R                  " US-   5      [         R                  " U* S5      /5      n[         R                  " US[        [        SUR                  S-   5      5      -   S9n[        XX[         R                  " S	U-  U-  5      -  5        [        US
   U	[         R                  " S	U-  U-  5      -  5        [        US   S	U-  U-  [         R                  " S	U-  U-  5      -  5        [        US   U
[         R                  " S	U-  U-  5      -  5        [        US   S	U-  U	-  [         R                  " S	U-  U-  5      -  5        [        US   US   5        [        US   U* U-  U-  [         R                  " S	U-  U-  5      -  5        g )N   
   r      )diff_n   r   axis              ?).r   ).r   ).r   r   ).r   r   ).r   r   ).r   r   )nplinspacepimeshgridscsph_harm_y_allsph_legendre_p_allconcatenatearangeexpand_dimstuplerangendimr   exp)selfm_maxn_maxthetaphiyy_jacy_hesspp_jacp_hessms               T/var/www/html/venv/lib/python3.13/site-packages/scipy/special/tests/test_sph_harm.pytest_pTestSphHarm.test_p   s   Aruu%kk!QruuW%[[,
,,U5aP&00uQO&NNBIIeai0"))UFA2FGHNN14eAejjl.C(D#DErvvb1fsl334furvvb1fsl/C'CDfrAvzBFF26C<4H'HIy)6BFF26C<4H+HIy)26E>BFF26C<<P+PQy)6)+<=y)A26A:rAv|8L+LM    r"   )r   r
   2   r!   )r         	      c                    [         R                  " S[         R                  5      n[         R                  " SS[         R                  -  5      n[         R                  " US-   5      n[         R                  " U[        [        SUR                  S-   5      5      S9n[         R                  " [         R                  " US-   5      [         R                  " U* S5      /5      n[         R                  " US[        [        SUR                  S-   5      5      -   S9n[        R                  " XX45      n[        R                  " XVX45      n[         R                  R                  XxSS9  g )Nr   r   r   r   r   gh㈵>)rtol)r   r   r   r   r   r   r   r   r   r   r   
sph_harm_ytestingr   )	r    r"   r!   r#   r$   nr+   y_actual	y_desireds	            r,   test_allTestSphHarm.test_all!   s     Aruu%kk!QY'IIeai NN15qA)>#?@NNBIIeai0"))UFA2FGHNN14eAejjl.C(D#DE$$U5>MM!3	


""8U"Cr/    N)__name__
__module____qualname____firstlineno__pytestmarkslowr-   parametrizer<   __static_attributes__r>   r/   r,   r   r      sa    [[N N0 [[Wk2[[W&67D 8 3Dr/   r   c                     S n S nS nS nXX#/n/ SQn/ SQn[         R                  " SS[         R                  -  5      n[         R                  " S[         R                  5      n[         R                  " Xx5      u  px[	        XEU5       H[  u  pn[        5        n
U
R                  [        S	9  [        [        R                  " XVXx5      U	" Xx5      S
S
SU SU S3S9  S S S 5        M]     g ! , (       d  f       Mo  = f)Nc                 V    S[         R                  " S[         R                  -  5      -  $ )N      ?r   )r   sqrtr   r#   r$   s     r,   Y00!test_first_harmonics.<locals>.Y00<   s    2771RUU7###r/   c                     S[         R                  " SS[         R                  -  -  5      -  [         R                  " SU -  5      -  [         R                  " U5      -  $ )NrJ      r   y             r   rK   r   r   sinrL   s     r,   Yn11"test_first_harmonics.<locals>.Yn11?   sA    2771ag;''s5y(99"&&+EEr/   c                     S[         R                  " S[         R                  -  5      -  [         R                  " U5      -  $ )NrJ   rP   )r   rK   r   cosrL   s     r,   Y01!test_first_harmonics.<locals>.Y01B   s+    2771RUU7##BFF3K//r/   c                     S[         R                  " SS[         R                  -  -  5      -  [         R                  " SU -  5      -  [         R                  " U5      -  $ )Ng      rP   r   r   rQ   rL   s     r,   Y11!test_first_harmonics.<locals>.Y11E   sA    BGGAqwK((5)99"&&+EEr/   )r   r   r   )r   r   r   r   r   r   )categorygV瞯<zY^_z
 incorrect)r6   atolerr_msg)r   r   r   r   zipr   filterDeprecationWarningr   r   sph_harm)rM   rS   rW   rZ   harmsr+   r9   r#   r$   harmsups              r,   test_first_harmonicsrh   2   s    $F0F !EAAKK1RUU7#E
++a
CU(JE%A&
 CJJ 2J3BKKe9 ,!&U&(1QCz$:< !  '  s   AC**
C9	)numpyr   rC   numpy.testingr   r   scipy.specialspecialr   r   rh   r>   r/   r,   <module>rm      s#      < )D )DV$<r/   