
    _Mh,|                     R   d dl Z d dlZd dlmZ d dlmZmZ d dlm	Z	m
Z
mZ d dlmZmZ d dlZdZdZdZd	Z G d
 de          Zd(dZd)dZd)dZd)dZd*dZd Zd Zd Zd Zd ZdZ d!                    d          Z"d e e"fdZ#dZ dZ$d!                    d          Z" ee e$e"          Z% ej        e ej        j&        d          Z'd Z d!Z$d"!                    d          Z" ee e$e"          Z( ej        e ej        j&        d          Z)d#!                    d          Z*	 	 	 	 d+d'Z+dS ),    N)wraps)FunctionDoc	Parameter)_contains_nan	AxisError_get_nan)array_namespaceis_numpyz{One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.zAfter omitting NaNs, one or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.zAll axis-slices of one or more sample arguments are too small; all elements of returned arrays will be NaN. See documentation for sample size requirements.zAfter omitting NaNs, one or more axis-slices of one or more sample arguments is too small; corresponding elements of returned arrays will be NaN. See documentation for sample size requirements.c                       e Zd ZdS )SmallSampleWarningN)__name__
__module____qualname__     \/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/scipy/stats/_axis_nan_policy.pyr   r   %   s        Dr   r   c                     | s| S 	t          |  nfd| D             } d | D             }t          ||          }||gt          |           z  }fdt          | |          D             S )zP
    Broadcast shapes of arrays, ignoring incompatibility of specified axes
    Nc                 :    g | ]}                     |          S r   )asarray).0arrxps     r   
<listcomp>z%_broadcast_arrays.<locals>.<listcomp>0   s#    000#bjjoo000r   c                     g | ]	}|j         
S r   shaper   r   s     r   r   z%_broadcast_arrays.<locals>.<listcomp>1       ***Cci***r   c                 B    g | ]\  }}                     ||          S r   )broadcast_to)r   array	new_shaper   s      r   r   z%_broadcast_arrays.<locals>.<listcomp>5   s;     = = = y OOE9-- = = =r   )r	   _broadcast_shapeslenzip)arraysaxisr   shapes
new_shapess     `  r   _broadcast_arraysr*   )   s      %'Z&	!	!RB0000000F**6***F"6400J| \#f++-
= = = =$'
$;$;= = = =r   c                   
 | s| S |t          j        |          }d}	 t          j        d          5  |                    t                    }ddd           n# 1 swxY w Y   n"# t
          $ r}t          |          |d}~ww xY wt          j        ||          st          |          |}t          d | D                       }t          j	        t          |           |ft                    }t          ||           D ])\  }}||t          |          t          |          z
  d<   *||||dk              z   ||dk     <   t          j        |          }|d         |k    s|d         dk     rd	| }t          |          t          t          j        |                    t          |          k    rt          d
          |dd|f         }	t          j        ||d          }t          j        |d          |                    d          z  t          j        |dk    |k    z             rt          d          |5|t          j        t          |                    z
  

fd|	D             }|S t%                    S )zF
    Broadcast shapes, ignoring incompatibility of specified axes
    Nz:`axis` must be an integer, a tuple of integers, or `None`.ignore)invalidc                 ,    g | ]}t          |          S r   )r$   )r   r   s     r   r   z%_broadcast_shapes.<locals>.<listcomp>N   s    111#e**111r   )dtyper   z/`axis` is out of bounds for array of dimension z*`axis` must contain only distinct elements   r'   z/Array shapes are incompatible for broadcasting.c           	      V    g | ]%}t          t          j        |                    &S r   )tuplenpinsert)r   removed_shapenew_axisr"   s     r   r   z%_broadcast_shapes.<locals>.<listcomp>r   s?     ; ; ;' BIi=IIJJ ; ; ;r   )r5   
atleast_1derrstateastypeint
ValueErrorr   array_equalmaxonesr$   r%   sortuniquedeleteallanyaranger4   )r(   r'   messageaxis_inten_dimsr)   rowr   removed_shapesr8   r"   s             @@r   r#   r#   9   s
      }T""N	,X... , ,;;s++, , , , , , , , , , , , , , , 	, 	, 	,G$$!+	,~h-- 	%G$$$ 11&11122F#f++v.c:::J*f-- * *
U$)CHHSZZ  !! $tax.0TAXwt}}8va1:17: :GG$$$ry3t99,,HIII#AAAtG,Yz4a888

 z***IQ'''I
 
vqZ9%<=>?? LJKKK")CII...; ; ; ; ;+9; ; ;
Ys:   A( AA( A  A( #A $A( (
B2BBc                 :    d | D             }t          ||          S )aJ  
    Broadcast shapes of arrays, dropping specified axes

    Given a sequence of arrays `arrays` and an integer or tuple `axis`, find
    the shape of the broadcast result after consuming/dropping `axis`.
    In other words, return output shape of a typical hypothesis test on
    `arrays` vectorized along `axis`.

    Examples
    --------
    >>> import numpy as np
    >>> from scipy.stats._axis_nan_policy import _broadcast_array_shapes_remove_axis
    >>> a = np.zeros((5, 2, 1))
    >>> b = np.zeros((9, 3))
    >>> _broadcast_array_shapes_remove_axis((a, b), 1)
    (5, 3)
    c                     g | ]	}|j         
S r   r   r   s     r   r   z7_broadcast_array_shapes_remove_axis.<locals>.<listcomp>   r   r   )_broadcast_shapes_remove_axis)r&   r'   r(   s      r   #_broadcast_array_shapes_remove_axisrP   y   s'    ( +*6***F(666r   c                 ~    t          | |          } | d         }|t          j        ||          }t          |          S )z
    Broadcast shapes, dropping specified axes

    Same as _broadcast_array_shapes_remove_axis, but given a sequence
    of array shapes `shapes` instead of the arrays themselves.
    r   )r#   r5   rC   r4   )r(   r'   r   s      r   rO   rO      s?     vt,,F1IE	%&&<<r   Fc                 Z    t          | |s|nd          } t          j        | |          }|S )z3Concatenate arrays along an axis with broadcasting.Nr2   )r*   r5   concatenate)r&   r'   pairedress       r   _broadcast_concatenaterV      s3    v6'CtttDDF
.d
+
+
+CJr   c                     |sd | D             S t          j        | d                   }| dd         D ]}|t          j        |          z  }| fd| D             S )z.Remove nans from paired or unpaired 1D samplesc                 D    g | ]}|t          j        |                    S r   r5   isnanr   samples     r   r   z _remove_nans.<locals>.<listcomp>   s*    @@@f((()@@@r   r   r1   Nc                      g | ]
}|         S r   r   )r   r\   not_nanss     r   r   z _remove_nans.<locals>.<listcomp>   s    333F8333r   rY   )samplesrT   nansr\   r^   s       @r   _remove_nansra      s      A@@@@@@ 8GAJD!""+ ' 'bhv&&&uH333373333r   c                     |sfd| D             S | d         k    }| dd         D ]}||k    z  }| fd| D             S )z9Remove sentinel values from paired or unpaired 1D samplesc                 (    g | ]}||k             S r   r   )r   r\   sentinels     r   r   z$_remove_sentinel.<locals>.<listcomp>   s#    AAAvv)*AAAr   r   r1   Nc                      g | ]
}|         S r   r   )r   r\   not_sentinelss     r   r   z$_remove_sentinel.<locals>.<listcomp>   s    888fF=!888r   r   )r_   rT   rd   	sentinelsr\   rf   s     `  @r   _remove_sentinelrh      s      BAAAAAAAA x'I!""+ 5 58!34		JM88888888r   c                    d}| D ])}t          |dd          }|pt          j        |          }*|s| d fS t          j        |  }t          j        |t          j                  r|nt          j        }t          t          |                     D ]"}| |         	                    |d          | |<   #t          j        |t          j
                  }|rt          j        nt          j        } ||          j         ||          j        }	}|rt          j        nd }
|}||	k    r=| D ]3}t          j        ||k              r |
|t          j                   } n4n||	k    =d}t#          |          g }| D ]}t          |dd           }|gt          j        ||j                  }t          j        |          r|j                                        n|j        }t          j        |          }|||<   |                    |           ||fS )NFmaskcopyc                     | dz
  S )Nr1   r   )x_s     r   <lambda>z2_masked_arrays_2_sentinel_arrays.<locals>.<lambda>   s
    1q5 r   zThis function replaces masked elements with sentinel values, but the data contains all distinct values of this data type. Consider promoting the dtype to `np.float64`.)getattrr5   rE   result_type
issubdtypenumberfloat64ranger$   r;   inexactfinfoiinfor?   min	nextafterinfr=   r    r   datarl   r   append)r_   has_maskr\   rj   r/   irw   infomax_possiblemin_possibler{   rd   rG   out_sampless                 r    _masked_arrays_2_sentinel_arraysr      s2   
 H , ,vvu--+rvd|| } NG$E]5")44DEE"*E3w<<   : : QZ&&u5&99

mE2:..G,288BHD!%e$$u++/,L 'A.@.@IH
\
!
! 	 	Fvf()) $9Xw77  \
!
!N !!! K # #vvt,,?466D+-6$<<HV[%%'''V[FZ''F#F4L6""""  r   c                     t          d | D                       sdS t          | |          }t          j        |          t	          |  z  }|S )zU
    Check for empty sample; return appropriate output for a vectorized hypotest
    c              3   ,   K   | ]}|j         d k    V  dS )r   N)sizer[   s     r   	<genexpr>z&_check_empty_inputs.<locals>.<genexpr>  s)      66Fv{a666666r   N)rE   rP   r5   r@   r   )r_   r'   output_shapeoutputs       r   _check_empty_inputsr      sW    
 66g66666 t 7wEELW\""Xw%77FMr   c                 (    |rfd| D             n| S )z^
    Add reduced axes back to all the arrays in the result object
    if keepdims = True.
    c                 h    g | ].}t          |t                    st          j        |          n|/S r   )
isinstancer<   r5   expand_dims)r   r   reduced_axess     r   r   z%_add_reduced_axes.<locals>.<listcomp>  sO     K K K<BJvs++8R^FL11117K K Kr   r   )rU   r   keepdimss    ` r   _add_reduced_axesr     sH     ! K K K KFIK K K K "r   r'   zIf an int, the axis of the input along which to compute the statistic.
The statistic of each axis-slice (e.g. row) of the input will appear in a
corresponding element of the output.
If ``None``, the input will be raveled before computing the statistic.
c                     d|  }t          |||          }t          j         |t          j         j        |           }||fS )Nzint or None, default: default)r   inspectKEYWORD_ONLY)default_axis_name_desc_type_axis_parameter_doc_axis_parameters         r   _get_axis_paramsr   "  sS    3\33E#E5%88'(/(9(F0<> > >O //r   
nan_policyz{'propagate', 'omit', 'raise'}a  Defines how to handle input NaNs.

- ``propagate``: if a NaN is present in the axis slice (e.g. row) along
  which the  statistic is computed, the corresponding entry of the output
  will be NaN.
- ``omit``: NaNs will be omitted when performing the calculation.
  If insufficient data remains in the axis slice along which the
  statistic is computed, the corresponding entry of the output will be
  NaN.
- ``raise``: if a NaN is present, a ``ValueError`` will be raised.	propagater   r   zbool, default: FalsezIf this is set to True, the axes which are reduced are left
in the result as dimensions with size one. With this option,
the result will broadcast correctly against the input array.a  
Beginning in SciPy 1.9, ``np.matrix`` inputs (not recommended for new
code) are converted to ``np.ndarray`` before the calculation is performed. In
this case, the output will be a scalar or ``np.ndarray`` of appropriate shape
rather than a 2D ``np.matrix``. Similarly, while masked elements of masked
arrays are ignored, the output will be a scalar or ``np.ndarray`` rather than a
masked array with ``mask=False``.r1      r   c	           	          pi }	ddd                     |	           d t          t          j                  j                  dk    rfdt                    s	dd	fd

n f	d}
|
S )a'  Factory for a wrapper that adds axis/nan_policy params to a function.

    Parameters
    ----------
    tuple_to_result : callable
        Callable that returns an object of the type returned by the function
        being wrapped (e.g. the namedtuple or dataclass returned by a
        statistical test) provided the separate components (e.g. statistic,
        pvalue).
    default_axis : int, default: 0
        The default value of the axis argument. Standard is 0 except when
        backwards compatibility demands otherwise (e.g. `None`).
    n_samples : int or callable, default: 1
        The number of data samples accepted by the function
        (e.g. `mannwhitneyu`), a callable that accepts a dictionary of
        parameters passed into the function and returns the number of data
        samples (e.g. `wilcoxon`), or `None` to indicate an arbitrary number
        of samples (e.g. `kruskal`).
    paired : {False, True}
        Whether the function being wrapped treats the samples as paired (i.e.
        corresponding elements of each sample should be considered as different
        components of the same sample.)
    result_to_tuple : callable, optional
        Function that unpacks the results of the function being wrapped into
        a tuple. This is essentially the inverse of `tuple_to_result`. Default
        is `None`, which is appropriate for statistical tests that return a
        statistic, pvalue tuple (rather than, e.g., a non-iterable datalass).
    too_small : int or callable, default: 0
        The largest unnacceptably small sample for the function being wrapped.
        For example, some functions require samples of size two or more or they
        raise an error. This argument prevents the error from being raised when
        input is not 1D and instead places a NaN in the corresponding element
        of the result. If callable, it must accept a list of samples, axis,
        and a dictionary of keyword arguments passed to the wrapper function as
        arguments and return a bool indicating weather the samples passed are
        too small.
    n_outputs : int or callable, default: 2
        The number of outputs produced by the function given 1d sample(s). For
        example, hypothesis tests that return a namedtuple or result object
        with attributes ``statistic`` and ``pvalue`` use the default
        ``n_outputs=2``; summary statistics with scalar output use
        ``n_outputs=1``. Alternatively, may be a callable that accepts a
        dictionary of arguments passed into the wrapped function and returns
        the number of outputs corresponding with those arguments.
    kwd_samples : sequence, default: ()
        The names of keyword parameters that should be treated as samples. For
        example, `gmean` accepts as its first argument a sample `a` but
        also `weights` as a fourth, optional keyword argument. In this case, we
        use `n_samples=1` and kwd_samples=['weights'].
    override : dict, default: {'vectorization': False, 'nan_propagation': True}
        Pass a dictionary with ``'vectorization': True`` to ensure that the
        decorator overrides the function's behavior for multimensional input.
        Use ``'nan_propagation': False`` to ensure that the decorator does not
        override the function's behavior for ``nan_policy='propagate'``.
    FT)vectorizationnan_propagationNc                     | S Nr   )rU   s    r   result_to_tuplez1_axis_nan_policy_factory.<locals>.result_to_tuple  s    Jr   r1   c                      ||           S r   r   )rU   ro   fs      r   r   z1_axis_nan_policy_factory.<locals>.result_to_tuple  s    1S66Mr   r0   r2   c                :    | D ]}|j         |         k    r dS dS )NTFr   )r_   r'   ts_args	ts_kwargsr\   	too_smalls        r   is_too_smallz._axis_nan_policy_factory.<locals>.is_too_small  s5    !    <%2244 35r   c                 X  	  t                     dd	 
f
d
            }t          	          \  }}t          |          }d |d         D             }d|v r||d         |                    d          <   n|d                             |           d|v r$t
          |d         |                    d          <   n |d                             t
                     d|v r$t          |d         |                    d          <   n |d                             t                     |d	xx         t          z  cc<   t          |          	                    d
d          d         }t          |          |_
        t          j        |          }|j        }t          |                                          }d|vr|                    |           d|vr|                    t                      d|vr|                    t"                     |                    |          }||_        |S )NF)_no_decoc                   
 !"#$ | r &|i S t          |          dk    rGt          t                                        t          (                              }|d d         }n|d         }t	          t          |                    s!d}dv sdv rt          |           &|i S t          t          j        &          j	                  }*1d t          t          |                    D             |dd          z   }t          j        &          j        rt          j        n%t          t          j        &          j                  }t          |          |k    r &|i  t!          t#          ||                    }t          |          t                    z  }	|	r &|i                      |           t'          *          r *          !n*pt          |          !) t'                     r             fd(D             t                    s&n&!fd	 fd	|d !         z   D             }
n# t(          $ r  &|i  Y nw xY wd
|v rdnd}|o+d          }                    d
%                              dd          "                    dd          }~t-          |
          \  }
#}I|
r:t          j        d |
D                       }t1          t          |                    }d |
D             }
nzt3          |
,snd           }
t          j                  t                    fd|
D             }
d |
D             }fd|D             }d t#          |
|          D             }
d|
r	t7          |
 nt          j        t          j        d |
D                       }t          j        |dk              r;"dk    s+d         r"fd|
D             }ndgt          |
          z  }t?          |          r9"dk    r3+d         r+t          j                    }tC          |||          } .| S tD          }t?          |          r"dk    rtG          |
,          }
tH          }#rtK          |
,#          }
 '|
          rGtM          j'        |tP          d           t          j                    }tC          |||          } .| S  |
i } -|           }tC          |||          } .| S tS          |
           '|
          sj*        dk    ri '|
          r,j*        dk    r!tM          j'        tV          tP          d           fdt                     D             }tC          |||          } .| S t          j        fd|
D                       }t          j,        |          $t[          |
,          }"dk    s+d         rt]          |"          \  }}nd}|r0|s.#s, |
d
i} -|           }tC          |||          } .| S |r"dk    r' !,-#$fd }n/|r"dk    r+d         r' !,-#$fd!}n' !,-#$fd"}t          j/        |d          }t          j0        |d|#          }tC          |||          } .| S )$Nr   r1   zIUse of `nan_policy` and `keepdims` is incompatible with non-NumPy arrays.r   r   c                     g | ]}d | S )argr   )r   r   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>  s    >>>)))>>>r   c                 @    g | ]}                     |d           |S r   )get)r   namekwdss     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>  s6     = = =88D$//; ;;;r   c                      t          t          | d                              }|                    |            | d          i |S r   )dictr%   update)r_   r   new_kwdshypotest_fun_inkwd_sampn_samps      r   hypotest_fun_outzv_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.hypotest_fun_out  sS    #C'&''2B$C$CDDHKK)))*?GGVG,<EEEEr   c                 ^    g | ])}t          j                            |                    *S r   )r5   r9   pop)r   paramr   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>  sC     F F F$ =%99 F F Fr   r'   TFr   r   c                     g | ]	}|j         
S r   ndimr[   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>  s    $G$G$GVV[$G$G$Gr   c                 Z    g | ](}t          j        |                                          )S r   )r5   r   ravelr[   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>  s*    LLL&2:fllnn55LLLr   r2   c                 t    g | ]4}t          j        |t          t                     d                     5S r   )r5   moveaxisrv   r$   r   r\   r'   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>  sI     2 2 2% ;vtUCII:q5I5IJJ 2 2 2r   c                     g | ]	}|j         
S r   r   r[   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>  s    ===6&,===r   c                 d    g | ],}|d           t          j        | d                    fz   -S r   )r5   prod)r   r   n_axess     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>!  sO     3 3 3"' $HfWHowxx1I1I0KK 3 3 3r   c                 >    g | ]\  }}|                     |          S r   )reshape)r   r\   r"   s      r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>#  s>     N N N0vy ">>)44 N N Nr   r0   c                     g | ]	}|j         
S r   r   r[   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>)  s    @@@ffk@@@r   r   c                 <    g | ]}t          |          d          S r   )r   )r   r\   r   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>-  s8     $; $; $;(. %2&*$E$Ea$H $; $; $;r   omitr   
stacklevelc                 8    g | ]}                                 S r   rk   )r   r   empty_outputs     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>Y  s%    AAAq|((**AAAr   c                 *    g | ]}|j                  S r   r   r   s     r   r   zp_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.<listcomp>_  s     IIIvT 2IIIr   )rT   c                 2   t          j        |           d z            }t          |	          }rt          |	          } |          r6t	          j        t          t          d           t          j                  S  
 |i           S )N   r   )	r5   splitra   rh   warningswarntoo_small_nd_omitr   fullrn   r_   NaNr   r   r   
n_kwd_sampn_outr   rT   r   rd   split_indicess     r   hypotest_funzr_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.hypotest_funq  s     hq-889K&:K9KLG*7F;;G N"27FH"M"M#|GT22 3 &79K124 4 4 4!wuc222*?+;+;W+M+M+MuUUUr   c                 F   t          j        |                                           rt          j                  S t          j        |           d z            }rt          |	          } |          rt          j                  S  
 |i           S r   )r5   rZ   rE   r   r   rh   r   s     r   r   zr_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.hypotest_fun  s    x{{(( 3!wuc222 hq-889K&:K9KLG N"27FH"M"M#|GT22 3!wuc222*?+;+;W+M+M+MuUUUr   c                     t          j        |           d z            }rt          |	          } |          rt          j                  S  
 |i           S r   )r5   r   rh   r   r   s     r   r   zr_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper.<locals>.hypotest_fun  s     hq-889K&:K9KLG N"27FH"M"M#|GT22 3!wuc222*?+;+;W+M+M+MuUUUr   )r'   r   )1r$   listsetintersectionr
   r	   NotImplementedErrorr   	signature
parametersrv   getfullargspecvarargsr5   r|   argsr   r%   r   callableKeyErrorr   r   r?   r4   r*   r9   r   nanr!   rD   rE   r   r   too_small_1d_not_omitra   too_small_1d_omitrh   r   r   r   r   r   too_small_nd_not_omitcumsumrV   r   r   apply_along_axis)/r   r   r   used_kwd_samplestempmsgparamsmaxargd_argsr   r_   
vectorizedr   r   rJ   r(   r)   ndimscontains_nanrU   too_small_msglengthsrn   ro   r   r   r'   r   r   r   r   r   r   r   r   rd   r   r   r   r   kwd_samples	n_outputs	n_samplesoverriderT   r   tuple_to_results/     `                      @@@@@@@@@@@@r   axis_nan_policy_wrapperz\_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.axis_nan_policy_wrapper  s	     6&5555 4yyA~~#'D		(>(>s;?O?O(P(P#Q#Q '+AwOD1122 6@4'':+=+=-c222&5555 '+O<<GHHF  ?>U3t99-=-=>>>K !( 6 G G O Mbffw5oFFKLL 4yy6!!.... #fd++,,Fv;;T2L /.... KK 	"" 0
 #4"/c$ii E $d= = = = = = =HXJ F#2  F F F F F F F/F F F F)/8)CF F F / / /....../ "(6!1!1uJ#EH_,E(EJ88FL11D,<<Jxx
E22H !A I IGX  L| 8  V$G$Gw$G$G$GHHF#(v#7#7LLLGLLL ,Gf:V$$RVWWW}T**T2 2 2 2)02 2 2==W===3 3 3 3+13 3 3
N N474L4LN N ND(/;(G$$RVC H@@@@@AAEveqj!! #-,,9J0K,$; $; $; $;29$; $; $;LL %*73w<<#7L |$$ 1**C*C.67H.I +D'%--C+CxHHC*?C00 !6|$$ 6v)=)=*7F;;G$5M J.wIIG<.. 1M-1CPQRRRR'%--C+CxHHC*?C00&&8488%oc511'\8DD&,, /w==L (!\'400 )4@4E4J4J<.. 0<3D3I3IM"79K-.0 0 0 0AAAAE%LLAAA'\8DD&,, hIIIIIIIJJGIg..M&wVDDDA [((H5F,G("/:">">aa$ -, -x -&&CdCdCC%oc511'\8DD&,,  !V
f 4 4	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V  V:#<#<01 $=	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	V 	VV V V V V V V V V V V V V V V AtQ''A%lBBBC#Cx@@C"?C((s   I I32I3c                     g | ]	}|j         
S r   )r   )r   r   s     r   r   zO_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator.<locals>.<listcomp>  s    EEE%5:EEEr   
Parametersr'   r   r   Notesr   r1   )r   )r   r   r   indexr~   _nan_policy_parameter_doc_keepdims_parameter_doc_standard_note_additionstrr   __doc__r   r   r   r   values_nan_policy_parameter_keepdims_parameterreplace__signature__)r   r  r   r   docparameter_namessigr   parameter_listr   r   r  r  r	  r
  rT   r   r  s   `        r   axis_nan_policy_decoratorz;_axis_nan_policy_factory.<locals>.axis_nan_policy_decorator  s   			49 k	) k	) k	) k	) k	) k	) k	) k	) k	) k	) k	) k	) k	) k	) k	) 
 	k	)Z 0@/M/M,_122EE3|3DEEE_$$# o33F;;<< $$%8999?**) o33LAABB $$%>???((' o33J??@@ $$%<===G//#hhnnT1%%a(*-c((' 788^
j//1122##!!/222z))!!"7888Z''!!"5666kk^k4403-&&r   )r   r$   r   r   r   r   )r  r   r	  rT   r   r   r  r  r
  r   r  r   s   `````````  @r   _axis_nan_policy_factoryr   S  s&   x >rD!&#') )HOOD	 	 	 7_--899Q>>&5 	 	 	 	 I !13 	 	 	 	 	 	 	 	 !Q' Q' Q' Q' Q' Q' Q' Q' Q' Q' Q' Q' Q'd %$r   )NNr   )F)r   r1   FNr   r   r   N),r   numpyr5   	functoolsr   scipy._lib._docscraper   r   scipy._lib._utilr   r   r   scipy._lib._array_apir	   r
   r   r   r   r   r   RuntimeWarningr   r*   r#   rP   rO   rV   ra   rh   r   r   r   r   r   r   r   r   r  r   r  r  r  r  r   r   r   r   <module>r'     s              8 8 8 8 8 8 8 8 ? ? ? ? ? ? ? ? ? ? ; ; ; ; ; ; ; ; 6 6 6 6 	 	 	 	 	 	 	 	= = = = =  =  =  = @7 7 7 70      4 4 49 9 9$5! 5! 5!p  " " " 	J U4[[  #$5 0 0 0 0 	(	F U4[[  &IeUE:: ))%*1*;*H2=? ? ?  	@ U4[[	 
 $)E5%88 'g'(/(9(F057 7 7 
%
 ',eDkk  <=16=>CGh% h% h% h% h% h%r   