+
    0iK              	          ^ RI t ^ RIt^ RIt^RIHt ^RIHtHtH	t	H
t
 ^RIHtHtHtHt . R6Ot ! R R4      t]! ]	RR^ R7      t	]	P$                  R 4       t]	P(                  R 4       t]! ]RR^ R7      t]P$                  R 4       t]P*                  R 4       t]P,                  R 4       t]P(                  R 4       t]! ]RR^R^ R7      t]P$                  R 4       t]P.                  R 4       t]P(                  R 4       t]! ]RR^R^ R7      t]P$                  R 4       t]P.                  R  4       t]P*                  R! 4       t]P,                  R" 4       t]P(                  R# 4       t]! ]RR$^ R7      t]P$                  R% 4       t]P(                  R& 4       t]! ]RR'^ R7      t]P$                  R( 4       t]P*                  R) 4       t]P,                  R* 4       t]P(                  R+ 4       t]! ]
R	R,R-^ R.7      t
]
P$                  R/ 4       t]
P(                  R0 4       t]! ]R
R1R-^ R.7      t]P$                  R2 4       t]P*                  R3 4       t]P,                  R4 4       t]P(                  R5 4       tR# )7    N_nonneg_int_or_fail)
legendre_passoc_legendre_psph_legendre_p
sph_harm_y)legendre_p_allassoc_legendre_p_allsph_legendre_p_allsph_harm_y_allr   r
   r   r	   r   r   r   r   c                   l   a  ] tR t^t o RRR/R llt]R 4       tR tR tR t	R	 t
R
 tR tR tRtV tR# )
MultiUFuncNforce_complex_outputFc                  \        V\        P                  4      '       g   \        V\        P                  P
                  4      '       d   VP                  4       pM8\        V\        P                  P                  4      '       d   TpM\        R 4      h\        4       pV F\  p\        V\        P                  4      '       g   \        RV 24      hVP                  \        R VP                   4       4      4       K^  	  \        V4      ^8  d   \        R4      hW n        Wn        W0n        W@n        WPn        RV n        RV n        RV n        R V n        R V n        R# )z7ufunc_or_ufuncs should be a ufunc or a ufunc collectionz2All ufuncs must have type `numpy.ufunc`. Received c              3   P   "   T F  qP                  R 4      ^ ,          x  K  	  R# 5i)z->N)split).0xs   & X/var/www/html/photoedit/myenv/lib/python3.14/site-packages/scipy/special/_multiufuncs.py	<genexpr>&MultiUFunc.__init__.<locals>.<genexpr>+   s     .UAwwt}Q/?/?   $&z*All ufuncs must take the same input types.Nc                      R# )N r   argskwargss   *,r   <lambda>%MultiUFunc.__init__.<locals>.<lambda>7   s    2    c                      / # Nr   r   s   *,r   r   r   8   s    Rr    )
isinstancenpufunccollectionsabcMappingvaluesIterable
ValueErrorsetadd	frozensettypeslen__name___ufunc_or_ufuncs_MultiUFunc__doc!_MultiUFunc__force_complex_output_default_kwargs_resolve_out_shapes_finalize_out_key_ufunc_default_args_ufunc_default_kwargs)	selfufunc_or_ufuncsnamedocr   default_kwargsufuncs_iterseen_input_typesr%   s	   &&&&$,   r   __init__MultiUFunc.__init__   s'   /28844/;??+B+BCC-446O[__-E-EFF-  "5 6 6
  #u$!%22$ &22A1B&D E E $$Y.U.U%UV	 %
 #$q( !MNN /
&:#-#' !	#= %?"r    c                    V P                   # r"   )r3   )r;   s   &r   __doc__MultiUFunc.__doc__:   s    zzr    c                    Wn         R# )z3Set `key` method by decorating a function.
        N)r8   r;   funcs   &&r   _override_keyMultiUFunc._override_key>   s	     	r    c                    Wn         R # r"   )r9   rH   s   &&r   _override_ufunc_default_args'MultiUFunc._override_ufunc_default_argsC   s    #' r    c                    Wn         R # r"   )r:   rH   s   &&r   _override_ufunc_default_kwargs)MultiUFunc._override_ufunc_default_kwargsF   s    %)"r    c                J    VP                   f   RVn         RVn        Wn        R# )z9Set `resolve_out_shapes` method by decorating a function.Nz2Resolve to output shapes based on relevant inputs.resolve_out_shapes)rE   r1   r6   rH   s   &&r   _override_resolve_out_shapes'MultiUFunc._override_resolve_out_shapesI   s#    <<H L,#' r    c                    Wn         R # r"   )r7   rH   s   &&r   _override_finalize_out!MultiUFunc._override_finalize_outQ   s    !r    c                    \        V P                  \        P                  4      '       d   V P                  # V P                  ! R/ VB pV P                  V,          # )z.Resolve to a ufunc based on keyword arguments.r   )r#   r2   r$   r%   r8   )r;   r   	ufunc_keys   &, r   _resolve_ufuncMultiUFunc._resolve_ufuncT   sI     d++RXX66(((II''	$$Y//r    c                   V P                   V,          pWP                  ! R/ VB ,          pV P                  ! R/ VB pWP                  ) R   Uu. uF  p\        P
                  ! V4      NK  	  ppV P                  ! R/ VB pV P                  Ee   \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      pV P                  ! . VR VP                  )  OVOVP                  N5/ VB p\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      p	\        VR4      '       d;   WP                  R,          ,           p
VP                  V
4      p
WP                  ) R  pMc\        P                  ! V	!  p\        P                  ! V\        P                  4      '       g   \        P                  pVP                  V3,          pV P                   '       d-   \        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      p\        ;QJ d    . R \#        W4       4       F  NK  	  5M! R \#        W4       4       4      pWR&   V! V/ VB pV P$                  e   V P%                  V4      pV# u upi )	Nc              3   N   "   T F  p\         P                  ! V4      x  K  	  R # 5ir"   )r$   shaper   	ufunc_args   & r   r   &MultiUFunc.__call__.<locals>.<genexpr>j   s     $U*YRXXi%8%8*s   #%c              3      "   T FB  p\        VR 4      '       d   VP                  M\        P                  ! \        V4      4      x  KD  	  R# 5i)dtypeN)hasattrrd   r$   typer`   s   & r   r   rb   o   s?      %B6@ 9@	78S8SY__*,((4	?*C&D6@s   A
Aresolve_dtypesc              3   P   "   T F  p\         P                  ! R V4      x  K  	  R# 5i)y              ?N)r$   result_type)r   ufunc_out_dtypes   & r   r   rb      s&      )R@P_ *,O)L)L@Pr   c              3   T   "   T F  w  r\         P                  ! WR 7      x  K   	  R# 5i))rd   N)r$   empty)r   ufunc_out_shaperj   s   &  r   r   rb      s)      DB =O HHBs   &(outr   r"   )r5   r9   r[   ninr$   asarrayr:   r6   tuplenoutre   rg   ri   
issubdtypeinexactfloat64r4   zipr7   )r;   r   r   r%   arg
ufunc_argsufunc_kwargsufunc_arg_shapesufunc_out_shapesufunc_arg_dtypesufunc_dtypesufunc_out_dtypesrj   rn   s   &*,           r   __call__MultiUFunc.__call__]   sW   %%.((2622##-f- 26yyjk1BC1B#bjjo1B
C11;F;$$0$u$U*$Uuu$U*$UU#77  Bk		z9J  B9I BKP:: B:@ B  %u %B6@%Buu %B6@%B  B u.///**w2FF$33LA#/#= "$..2B"CorzzBB&(jjO#(::0B#B ***#(5 )R@P)R55 )R@P)R $R  % D/BD%% D/BD DC #&Z0<0*$$S)C
O Ds   I2)
__doc__force_complex_outputr1   r5   r7   r8   r6   r9   r:   r2   )NN)r1   
__module____qualname____firstlineno__rB   propertyrE   rJ   rM   rP   rT   rW   r[   r   __static_attributes____classdictcell__)__classdict__s   @r   r   r      sQ     @&+@B  
(*("0/ /r    r   a  sph_legendre_p(n, m, theta, *, diff_n=0)

    Spherical Legendre polynomial of the first kind.

    Parameters
    ----------
    n : ArrayLike[int]
        Degree of the spherical Legendre polynomial. Must have ``n >= 0``.
    m : ArrayLike[int]
        Order of the spherical Legendre polynomial.
    theta : ArrayLike[float]
        Input value.
    diff_n : Optional[int]
        A non-negative integer. Compute and return all derivatives up
        to order ``diff_n``. Default is 0.

    Returns
    -------
    p : ndarray or tuple[ndarray]
        Spherical Legendre polynomial with ``diff_n`` derivatives.

    Notes
    -----
    The spherical counterpart of an (unnormalized) associated Legendre polynomial has
    the additional factor

    .. math::

        \sqrt{\frac{(2 n + 1) (n - m)!}{4 \pi (n + m)!}}

    It is the same as the spherical harmonic :math:`Y_{n}^{m}(\theta, \phi)`
    with :math:`\phi = 0`.
    diff_nc                 b    \        V R RR7      p ^ T u;8:  d   ^8:  g   M \        RV  R24      hV # r   FstrictGdiff_n is currently only implemented for orders 0, 1, and 2, received: .r   r+   r   s   &r   _r      B     %@F! $
 	
 Mr    c                 2    \         P                  ! V R^ 4      #    r$   moveaxisrn   s   &r   r   r          ;;sB""r    a  sph_legendre_p_all(n, m, theta, *, diff_n=0)

    All spherical Legendre polynomials of the first kind up to the
    specified degree ``n``, order ``m``, and all derivatives up
    to order ``diff_n``.

    Output shape is ``(diff_n + 1, n + 1, 2 * m + 1, ...)``. The entry at
    ``(i, j, k)`` corresponds to the ``i``-th derivative, degree ``j``, and
    order ``k`` for all ``0 <= i <= diff_n``, ``0 <= j <= n``, and
    ``-m <= k <= m``.

    See Also
    --------
    sph_legendre_p
    c                 b    \        V R RR7      p ^ T u;8:  d   ^8:  g   M \        RV  R24      hV # r   r   r   s   &r   r   r      r   r    c                     R R.R.,           /# axesr   )r   r   r   r   r   s   &r   r   r      s    RDJ<'((r    c                     \        V \        P                  4      '       d   V ^ 8  d   \        R4      hV ^,           ^\	        V4      ,          ^,           3V,           V^,           3,           3# )r   !n must be a non-negative integer.)r#   numbersIntegralr+   abs)nmtheta_shaperr   r   s   &&&&&r   r   r      sU    a))**q1u<==UAAJN#k1VaZMACCr    c                 2    \         P                  ! V R^ 4      # r   r   r   s   &r   r   r      r   r    a  assoc_legendre_p(n, m, z, *, branch_cut=2, norm=False, diff_n=0)

    Associated Legendre polynomial of the first kind.

    Parameters
    ----------
    n : ArrayLike[int]
        Degree of the associated Legendre polynomial. Must have ``n >= 0``.
    m : ArrayLike[int]
        order of the associated Legendre polynomial.
    z : ArrayLike[float | complex]
        Input value.
    branch_cut : Optional[ArrayLike[int]]
        Selects branch cut. Must be 2 (default) or 3.
        2: cut on the real axis ``|z| > 1``
        3: cut on the real axis ``-1 < z < 1``
    norm : Optional[bool]
        If ``True``, compute the normalized associated Legendre polynomial.
        Default is ``False``.
    diff_n : Optional[int]
        A non-negative integer. Compute and return all derivatives up
        to order ``diff_n``. Default is 0.

    Returns
    -------
    p : ndarray or tuple[ndarray]
        Associated Legendre polynomial with ``diff_n`` derivatives.

    Notes
    -----
    The normalized counterpart of an (unnormalized) associated Legendre
    polynomial has the additional factor

    .. math::

        \sqrt{\frac{(2 n + 1) (n - m)!}{2 (n + m)!}}
    F
branch_cutnormr   c                 d    \        VR RR7      p^ Tu;8:  d   ^8:  g   M \        RV R24      hW3# r   r   r   s   &&&r   r   r   #  sE     %@F! $
 	
 <r    c                     V 3# r"   r   r   s   &&&r   r   r   .  
    ;r    c                 2    \         P                  ! V R^ 4      # r   r   r   s   &r   r   r   3  r   r    a  assoc_legendre_p_all(n, m, z, *, branch_cut=2, norm=False, diff_n=0)

    All associated Legendre polynomials of the first kind up to the
    specified degree ``n``, order ``m``, and all derivatives up
    to order ``diff_n``.

    Output shape is ``(diff_n + 1, n + 1, 2 * m + 1, ...)``. The entry at
    ``(i, j, k)`` corresponds to the ``i``-th derivative, degree ``j``, and
    order ``k`` for all ``0 <= i <= diff_n``, ``0 <= j <= n``, and
    ``-m <= k <= m``.

    See Also
    --------
    assoc_legendre_p
    c                     \        V\        P                  4      '       d   V^ 8  g   \        RV R24      h^ Tu;8:  d   ^8:  g   M \        RV R24      hW3# r   z1diff_n must be a non-negative integer, received: r   r   )r#   r   r   r+   r   s   &&&r   r   r   M  sl     0 011!?xqI
 	
 ! $
 	
 <r    c                     V 3# r"   r   r   s   &&&r   r   r   \  r   r    c                     R RR.R.,           /# r   r   r   s   &&&r   r   r   a  s    RH
|+,,r    c                 v   VR ,          p\        V \        P                  4      '       d   V ^ 8  d   \        R4      h\        V\        P                  4      '       d   V^ 8  d   \        R4      hV ^,           ^\	        V4      ,          ^,           3\
        P                  ! W#4      ,           V^,           3,           3# )r   r   z!m must be a non-negative integer.r#   r   r   r+   r   r$   broadcast_shapes)r   r   z_shapebranch_cut_shaperr   r   r   s   &&&&&, r   r   r   f  s    HFa))**q1u<==a))**q1u<==UAAJN#
G67:@1*G I Ir    c                 2    \         P                  ! V R^ 4      # r   r   r   s   &r   r   r   s  r   r    a  legendre_p(n, z, *, diff_n=0)

    Legendre polynomial of the first kind.

    Parameters
    ----------
    n : ArrayLike[int]
        Degree of the Legendre polynomial. Must have ``n >= 0``.
    z : ArrayLike[float]
        Input value.
    diff_n : Optional[int]
        A non-negative integer. Compute and return all derivatives up
        to order ``diff_n``. Default is 0.

    Returns
    -------
    p : ndarray or tuple[ndarray]
        Legendre polynomial with ``diff_n`` derivatives.

    See Also
    --------
    legendre

    References
    ----------
    .. [1] Zhang, Shanjie and Jin, Jianming. "Computation of Special
           Functions", John Wiley and Sons, 1996.
           https://people.sc.fsu.edu/~jburkardt/f77_src/special_functions/special_functions.html
    c                     \        V \        P                  4      '       d   V ^ 8  d   \        RV  R24      h^ T u;8:  d   ^8:  g   M \	        RV  R24      hV # r   )r#   r   r   r+   NotImplementedErrorr   s   &r   r   r     sh    vw//00fqj?xqI
 	
 !! $
 	
 Mr    c                 2    \         P                  ! V R^ 4      # r   r   r   s   &r   r   r     r   r    a  legendre_p_all(n, z, *, diff_n=0)

    All Legendre polynomials of the first kind up to the specified degree
    ``n`` and all derivatives up to order ``diff_n``.

    Output shape is ``(diff_n + 1, n + 1, ...)``. The entry at ``(i, j)``
    corresponds to the ``i``-th derivative and degree ``j`` for all
    ``0 <= i <= diff_n`` and ``0 <= j <= n``.

    See Also
    --------
    legendre_p
    c                 b    \        V R RR7      p ^ T u;8:  d   ^8:  g   M \        RV  R24      hV # r   r   r   s   &r   r   r     r   r    c                     R RR./# )r   r   )r   r   r   r   s   &r   r   r     s    RM""r    c                 l    \        V R RR7      p W ^,           3V,           V^,           3,           3,          # )r   Fr   r   )r   r   rr   r   s   &&&&r   r   r     s2    As51AE8g%!5777r    c                 2    \         P                  ! V R^ 4      # r   r   r   s   &r   r   r     r   r    a  sph_harm_y(n, m, theta, phi, *, diff_n=0)

    Spherical harmonics. They are defined as

    .. math::

        Y_n^m(\theta,\phi) = \sqrt{\frac{2 n + 1}{4 \pi} \frac{(n - m)!}{(n + m)!}}
            P_n^m(\cos(\theta)) e^{i m \phi}

    where :math:`P_n^m` are the (unnormalized) associated Legendre polynomials.

    Parameters
    ----------
    n : ArrayLike[int]
        Degree of the harmonic. Must have ``n >= 0``. This is
        often denoted by ``l`` (lower case L) in descriptions of
        spherical harmonics.
    m : ArrayLike[int]
        Order of the harmonic.
    theta : ArrayLike[float]
        Polar (colatitudinal) coordinate; must be in ``[0, pi]``.
    phi : ArrayLike[float]
        Azimuthal (longitudinal) coordinate; must be in ``[0, 2*pi]``.
    diff_n : Optional[int]
        A non-negative integer. Compute and return all derivatives up
        to order ``diff_n``. Default is 0.

    Returns
    -------
    y : ndarray[complex] or tuple[ndarray[complex]]
       Spherical harmonics with ``diff_n`` derivatives.

    Notes
    -----
    There are different conventions for the meanings of the input
    arguments ``theta`` and ``phi``. In SciPy ``theta`` is the
    polar angle and ``phi`` is the azimuthal angle. It is common to
    see the opposite convention, that is, ``theta`` as the azimuthal angle
    and ``phi`` as the polar angle.

    Note that SciPy's spherical harmonics include the Condon-Shortley
    phase [2]_ because it is part of `sph_legendre_p`.

    With SciPy's conventions, the first several spherical harmonics
    are

    .. math::

        Y_0^0(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{1}{\pi}} \\
        Y_1^{-1}(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{3}{2\pi}}
                                    e^{-i\phi} \sin(\theta) \\
        Y_1^0(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{3}{\pi}}
                                 \cos(\theta) \\
        Y_1^1(\theta, \phi) &= -\frac{1}{2} \sqrt{\frac{3}{2\pi}}
                                 e^{i\phi} \sin(\theta).

    References
    ----------
    .. [1] Digital Library of Mathematical Functions, 14.30.
           https://dlmf.nist.gov/14.30
    .. [2] https://en.wikipedia.org/wiki/Spherical_harmonics#Condon.E2.80.93Shortley_phase
    T)r   r   c                 b    \        V R RR7      p ^ T u;8:  d   ^8:  g   M \        RV  R24      hV # r   r   r   s   &r   r   r   !  r   r    c                 :   V P                   R,          ^8X  d
   V R,          # V P                   R,          ^8X  d   V R,          V R^^ .^ ^.3,          3# V P                   R,          ^8X  d1   V R,          V R^^ .^ ^.3,          V R^^.^^ ..^ ^.^^..3,          3# R# r   .Nr   ).r   r   r_   r   s   &r   r   r   ,      		"9~		"9~s3AA#6777		"IC!Q!Q$7 8q!fq!f%AA'778: 	: 	r    a  sph_harm_y_all(n, m, theta, phi, *, diff_n=0)

    All spherical harmonics up to the specified degree ``n``, order ``m``,
    and all derivatives up to order ``diff_n``.

    Returns a tuple of length ``diff_n + 1`` (if ``diff_n > 0``). The first
    entry corresponds to the spherical harmonics, the second entry
    (if ``diff_n >= 1``) to the gradient, and the third entry
    (if ``diff_n >= 2``)  to the Hessian matrix. Each entry is an array of
    shape ``(n + 1, 2 * m + 1, ...)``, where the entry at ``(i, j)``
    corresponds to degree ``i`` and order ``j`` for all ``0 <= i <= n``
    and ``-m <= j <= m``.

    See Also
    --------
    sph_harm_y
    c                 b    \        V R RR7      p ^ T u;8:  d   ^8:  g   M \        RV  R24      hV # )r   Fr   z=diff_n is currently only implemented for orders 2, received: r   r   r   s   &r   r   r   P  r   r    c                     R RR.R.,           /# )r   r   )r   r   r   r   r   s   &r   r   r   [  s    RH//00r    c                 "   VR ,          p\        V \        P                  4      '       d   V ^ 8  d   \        R4      hV ^,           ^\	        V4      ,          ^,           3\
        P                  ! W#4      ,           V^,           V^,           3,           3# )r   r   r   )r   r   r   	phi_shaperr   r   r   s   &&&&&, r   r   r   `  sx    HFa))**q1u<==UAAJN#b&9&9+&QQ	!VaZ ! # #r    c                 :   V P                   R,          ^8X  d
   V R,          # V P                   R,          ^8X  d   V R,          V R^^ .^ ^.3,          3# V P                   R,          ^8X  d1   V R,          V R^^ .^ ^.3,          V R^^.^^ ..^ ^.^^..3,          3# R# r   r   r   s   &r   r   r   k  r   r    )r   r
   r   r	   r   r   r   r   )r&   r   numpyr$   _input_validationr   _special_ufuncsr   r   r   r   _gufuncsr	   r
   r   r   __all__r   rJ   r   rW   rP   rT   rM   r   r    r   <module>r      s      2: :; ;	t tn  @ G$N   &&# '#   # * !! " 22) 3) 00D 1D **# +# $H E!O( V    .. / ((# )# " E!# * ## $ 22 3 44- 5- 22	I 3	I ,,# -# 8 ? 
F 
 
 ""# ##  &   ..# /# ,,8 -8 &&# '# =z #1AA
H   ""	: #	:   #1'.   ..1 /1 ,,# -# &&	: '	:r    