← Back
Editing: _resampling.cpython-311.pyc
� d�c� � � � d dl Z d dlZd dlmZmZmZ d dlZd dlm Z d dl mZmZm Z mZ d dlmZ d dlmZ ddlmZ dd lmZmZ dd lmZ g d�Zd� Zd,d �Zd-d�Zd� Zd� Zd� Zd� Z g d�Z! ede!� � Z"ddddd ddddd� d�Z#d� Z$g d�Z! ede!� � Z%ddddd d�d �Z&dZ' ed!e'� � Z(d"� Z)d#� Z*d$� Z+ d,d%�Z, d,d&�Z- d,d'�Z.d(� Z/d)ddddd dd*�d+�Z0dS ).� N)�combinations�permutations�product)�check_random_state)�ndtr�ndtri�comb� factorial)�rng_integers)�make_dataclass� )�ConfidenceInterval)�_broadcast_concatenate�_broadcast_arrays)�DegenerateDataWarning)� bootstrap�monte_carlo_test�permutation_testc � � � dd�� fd� }|S )zVectorize an n-sample statisticr ��axisc �� �� �� � fd�|D � � }t j |� � d d� �t |� � � }t j |� d� � }��fd�}t j |d|� � d S )Nc �* �� g | ]}|j � ��S � ��shape)�.0�sampler s ��9/usr/lib/python3/dist-packages/scipy/stats/_resampling.py� <listcomp>z9_vectorize_statistic.<locals>.stat_nd.<locals>.<listcomp> s �� �9�9�9�&�6�<��%�9�9�9� ���r c �8 �� t j | �� � } �|� S �N)�np�split)�z�data� split_indices� statistics ��r �stat_1dz6_vectorize_statistic.<locals>.stat_nd.<locals>.stat_1d s! �� ��8�A�}�-�-�D��9�d�#�#r! r )r% �cumsumr �moveaxis�apply_along_axis)r r( �lengthsr'