+
    LV-jø  ã                   ó’   € ^ RI t ^ RIt^ RIHtHtHtHt ^ RIH	u H
t ^RIHt ]! 4       ]! R ^R R7      R
RR/R	 ll4       4       tR# )é    N)Úarray_namespaceÚxp_capabilitiesÚ	xp_deviceÚ_length_nonmasked)Ú_axis_nan_policy_factoryc                 ó   € V # ©N© )Úxs   &Úg/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/scipy/stats/_variation.pyÚ<lambda>r      s   € ‰aó    c                 ó   € V 3# r	   r
   )r   Ú_s   &&r   r   r      s   € ¸A¹4r   )Ú	n_outputsÚresult_to_tupleÚkeepdimsFc          	     óî  € \        V 4      pVP                  V 4      p Vf   VP                  V R	4      p ^ pVP                  \        WR7      V P                  \        V 4      R7      p\        P                  ! RRR7      ;_uu_ 4        \        P                  ! 4       ;_uu_ 4        \        P                  ! R4       VP                  WR7      pVP                  WR7      pWfV,
          ,          R,          p	W‰,          V,          p
RRR4       RRR4       R p\        P                  ! W68H  XX3VX
R7      p
V
P                  ^ 8X  d
   V
R
,          # T
#   + '       g   i     LU; i  + '       g   i     L`; i)aq  
Compute the coefficient of variation.

The coefficient of variation is the standard deviation divided by the
mean.  This function is equivalent to::

    np.std(x, axis=axis, ddof=ddof) / np.mean(x)

The default for ``ddof`` is 0, but many definitions of the coefficient
of variation use the square root of the unbiased sample variance
for the sample standard deviation, which corresponds to ``ddof=1``.

The function does not take the absolute value of the mean of the data,
so the return value is negative if the mean is negative.

Parameters
----------
a : array_like
    Input array.
axis : int or None, optional
    Axis along which to calculate the coefficient of variation.
    Default is 0. If None, compute over the whole array `a`.
nan_policy : {'propagate', 'raise', 'omit'}, optional
    Defines how to handle when input contains ``nan``.
    The following options are available:

      * 'propagate': return ``nan``
      * 'raise': raise an exception
      * 'omit': perform the calculation with ``nan`` values omitted

    The default is 'propagate'.
ddof : int, optional
    Gives the "Delta Degrees Of Freedom" used when computing the
    standard deviation.  The divisor used in the calculation of the
    standard deviation is ``N - ddof``, where ``N`` is the number of
    elements.  `ddof` must be less than ``N``; if it isn't, the result
    will be ``nan`` or ``inf``, depending on ``N`` and the values in
    the array.  By default `ddof` is zero for backwards compatibility,
    but it is recommended to use ``ddof=1`` to ensure that the sample
    standard deviation is computed as the square root of the unbiased
    sample variance.

Returns
-------
variation : ndarray
    The calculated variation along the requested axis.

Notes
-----
There are several edge cases that are handled without generating a
warning:

* If both the mean and the standard deviation are zero, ``nan``
  is returned.
* If the mean is zero and the standard deviation is nonzero, ``inf``
  is returned.
* If the input has length zero (either because the array has zero
  length, or all the input values are ``nan`` and ``nan_policy`` is
  ``'omit'``), ``nan`` is returned.
* If the input contains ``inf``, ``nan`` is returned.

References
----------
.. [1] Zwillinger, D. and Kokoska, S. (2000). CRC Standard
   Probability and Statistics Tables and Formulae. Chapman & Hall: New
   York. 2000.

Examples
--------
>>> import numpy as np
>>> from scipy.stats import variation
>>> variation([1, 2, 3, 4, 5], ddof=1)
0.5270462766947299

Compute the variation along a given dimension of an array that contains
a few ``nan`` values:

>>> x = np.array([[  10.0, np.nan, 11.0, 19.0, 23.0, 29.0, 98.0],
...               [  29.0,   30.0, 32.0, 33.0, 35.0, 56.0, 57.0],
...               [np.nan, np.nan, 12.0, 13.0, 16.0, 16.0, 17.0]])
>>> variation(x, axis=1, ddof=1, nan_policy='omit')
array([1.05109361, 0.31428986, 0.146483  ])

N)Úaxis©ÚdtypeÚdeviceÚignore)ÚdivideÚinvalidg      à?c                 óØ   € \        W4      pVP                  VP                  VP                  \	        V4      R 7      pVP                  V ^ 8„  VP                  W14      VP                  4      # )r   )r   ÚasarrayÚinfr   r   ÚwhereÚcopysignÚnan)Ústd_aÚmean_aÚmxpÚ_xp_infs   &&  r   Úspecial_caseÚvariation.<locals>.special_casey   sS   € ä˜eÓ,ˆð —+‘+˜cŸg™g¨V¯\©\Ä)ÈFÓBS�+ÓTˆØ�y‰y˜ ™ C§L¡L°Ó$AÀ3Ç7Á7ÓKÐKr   )Ú
fill_value)éÿÿÿÿr
   )r   r   Úreshaper   r   r   ÚnpÚerrstateÚwarningsÚcatch_warningsÚsimplefilterÚmeanÚstdÚxpxÚapply_whereÚndim)Úar   Ú
nan_policyÚddofr   ÚxpÚnr#   r"   Ú
correctionÚresultr&   s   &&&&$       r   Ú	variationr<      s   € ôr 
˜Ó	€BØ
�
‰
�1‹€Að ‚|Ø�J‰J�q˜%Ó ˆØˆà
�
‰
Ô$ QÔ2¸!¿'¹'Ì)ÐTUË,ˆ
ÓW€Aä
�+Š+˜X¨x×
8Ö
8¼(×:QÒ:Q×:SÕ:SÜ×Ò˜hÔ'Ø—‘˜�Ó&ˆØ—‘�q�Ó$ˆØ˜t�8•n sÕ*ˆ
ØÕ# fÕ,ˆ÷ ;T×
8òLô �_Š_˜d™i¨5°&¨/Ø)°fô>€Fð  Ÿ™¨Ô)ˆ6�"�:Ð5¨vÐ5÷% ;T×:Sú×
8×
8ús%   ÂE$Â$A E	ÄE$ÅE!ÅE$Å$E4	)r   Ú	propagater   )r-   Únumpyr+   Úscipy._lib._array_apir   r   r   r   Úscipy._lib.array_api_extraÚ_libÚarray_api_extrar2   Ú_axis_nan_policyr   r<   r
   r   r   Ú<module>rD      sV   ðÛ Û ÷ó ÷ )Ð (å 6ñ ÓÙÙ˜1Ñ.?ôñq6ÀUô q6óó òq6r   