| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/pandas/tests/extension/base/__pycache__/ |
Upload File : |
�
/ �gP � � � d dl mZ d dlZd dlZd dlmZ d dlm Z G d� d� Z
G d� de
� Z G d� d e
� Z G d
� de
� Z
y)� )�finalN)�is_numeric_dtypec � � e Zd ZdZdej
dedefd�Zdej
dedefd�Z dedefd�Z
edej
dedefd �� Ze
j j dd
dg� d� � Ze
j j# d
� e
j j dd
dg� d� � � Ze
j j dd
dg� d� � Zy)�BaseReduceTestszg
Reduction specific tests. Generally these only
make sense for numeric/boolean operations.
�ser�op_name�returnc � � y)NF� ��selfr r s �DC:\Python312\Lib\site-packages\pandas/tests/extension/base/reduce.py�_supports_reductionz#BaseReduceTests._supports_reduction s � �� �skipnac �$ � t ||� } |j d� }t ||� }|dk( r |� } |� }n ||�� } ||�� }t j ||� y # t t f$ r |j t � }Y �ow xY w)N�float64�count�r )�getattr�astype� TypeError�
ValueError�object�tm�assert_almost_equal) r
r r r �res_op�alt�exp_op�result�expecteds r �check_reducezBaseReduceTests.check_reduce s� � � ��g�&�� %��*�*�Y�'�C� ��g�&���g���X�F��x�H��6�*�F��V�,�H�
���v�x�0�� �:�&� %� �*�*�V�$�C� %�s �A( �($B�Bc � � |j S )N��dtype)r
�arrr r s r �_get_expected_reduction_dtypez-BaseReduceTests._get_expected_reduction_dtype+ s � � �y�y�r c �@ � |j }t j d|i� }|dv rddini }| j |||� } |j |f|dd�|��} t ||� d d|i|��j } t
j || � |sE|j � j � r't j t j g|�� }
n7 t |j � |� � }t j |g|�� }
t
j ||
� y )
N�a)�var�std�ddof� T)r �keepdimsr r$ r )�array�pd� DataFramer'