관리-도구
편집 파일: test_histograms.cpython-311.pyc
� �܋f�~ � � � d dl Zd dlmZmZmZ d dlmZmZm Z m Z mZmZm Z mZmZmZ d dlmZ d dlZ G d� d� � Z G d� d� � Z G d � d � � ZdS )� N)� histogram�histogramdd�histogram_bin_edges) �assert_�assert_equal�assert_array_equal�assert_almost_equal�assert_array_almost_equal� assert_raises�assert_allclose�assert_array_max_ulp�assert_raises_regex�suppress_warnings)�requires_memoryc � � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z d � Zd � Zd� Z d� Zd � Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z! e"d �!� � e#j$ j% d"� � � � � Z&d#S )$� TestHistogramc � � d S �N� ��selfs �r/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/lib/tests/test_histograms.py�setup_methodzTestHistogram.setup_method � � ��� c � � d S r r r s r �teardown_methodzTestHistogram.teardown_method r r c � � d}t j � |� � }t |� � \ }}t t j |d�� � |� � t t j ddd� � � � \ }}t |d� � d S )N�d r ��axis� )�np�random�randr r �sum�linspacer )r �n�v�a�bs r �test_simplezTestHistogram.test_simple s � ����I�N�N�1�����1�����A��R�V�A�A�&�&�&��*�*�*� �2�;�q�"�c�2�2�3�3���A��1�b�!�!�!�!�!r c �r � t g d�ddg� � \ }}t |dg� � t |ddg� � t t t ddgd�� � t ddgd�� � \ }}t |t j dg� � � � t |t j ddg� � � � d S )N�� � � � r/ r0 r ��bins� �?� @)r r r � ValueErrorr r# �arrayr )r �hist�edges�h�es r �test_one_binzTestHistogram.test_one_bin s� � �����q�!�f�5�5���e��4�!��'�'�'��5�1�a�&�)�)�)��j�)�a��V�!�<�<�<�<��!�Q��a�(�(�(���1��Q���!�� � �&�&�&���2�8�R��H�-�-�.�.�.�.�.r c �& � d}t j � |� � }t |d�� � \ }}t j |t j |� � z � � }t |d� � t j d� � }g d�}t ||d�� � \ }}t |d� � t t j |t j |� � z � � d� � t ||d�� � \ }}t |g d �� � t j d� � }d dddt j g}t ||d�� � \ }}t |g d �� � t j g d �ddt j gd�� � \ }}t |dd g� � d S )Nr T��densityr/ r"