관리-도구
편집 파일: test_multiarray.cpython-311.pyc
� �܋f�� � � � d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl Z d dlZd dlZd dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlZd dlZd dlmZ d dlZd dlZd dlmc mZ d dlm Z d dl!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3 d dl4m5Z5m6Z6 d d l7m8Z8 d d l9m:Z: d dl;m<Z< d dl=m>Z>m=Z= d � Z?e@ddfd�ZA G d� d� � ZB G d� d� � ZC G d� d� � ZD G d� d� � ZE G d� d� � ZF G d� d� � ZG G d� d� � ZH G d� d� � ZI G d � d!� � ZJ G d"� d#� � ZK G d$� d%� � ZL G d&� d'� � ZM G d(� d)� � ZN G d*� d+� � ZO G d,� d-� � ZP G d.� d/� � ZQ G d0� d1� � ZR G d2� d3� � ZS G d4� d5� � ZT G d6� d7� � ZU G d8� d9� � ZV G d:� d;� � ZW G d<� d=� � ZX G d>� d?� � ZY G d@� dA� � ZZ G dB� dC� � Z[ G dD� dE� � Z\ G dF� dG� � Z] G dH� dI� � Z^ G dJ� dK� � Z_ G dL� dM� � Z` G dN� dO� � Za G dP� dQ� � Zb G dR� dS� � Zc G dT� dU� � Zd G dV� dW� � Ze G dX� dY� � ZfdZ� Zgd[� Zhd\� Zi G d]� d^� � Zj G d_� d`� � Zk G da� db� � Zl G dc� dd� � Zm G de� dfem� � Zn G dg� dhem� � Zo G di� dj� � Zpdk� Zq G dl� dm� � Zr G dn� do� � Zs G dp� dq� � Ztd drdsdtdudv�Zuejv �w dwe@egdxdyg�z� � G d{� d|� � � � Zx G d}� d~� � Zy G d� d�� � Zz G d�� d�� � Z{d d�l|m}Z} G d�� d�� � Z~ G d�� d�� � Z G d�� d�e�� � Z� G d�� d�� � Z� G d�� d�� � Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z�d�� Z� G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z�e+s G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z�d d�l!m+Z+ G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z� G d�� d�� � Z�d�� Z�d�� Z�ejv �w d�ej� ej� g� � ejv �w d�d�gd�gd�gfd�d�g� � d�� � � � � Z�ejv �w d�d�gg d��� � d�� � � Z�ejv �w d�ej� ej� ej� ej� ej� ej� g� � d�� � � Z�d�� Z�ejv �w d�ej� ej� ej� ej� ej� ej� g� � d�� � � Z�ejv �w d�d�gej� ej� fej� ej� fg� � ejv �w d�drej� ej� ej� g� � ejv �w d�drej� ej� ej� g� � ejv �w d�ej� �� � � � � dDŽ � � � � � � � � Z�dȄ Z�dɄ Z� G dʄ d˦ � Z�d̄ Z� G d̈́ dΦ � Z�ejv �� e3dϬЦ � ejv �w d� ej� drdҦ � � � ejv �w d�g dԢ� � dՄ � � � � � � Z�dք Z�ejv �w d� ej� drdҦ � � � ejv �w d�g dע� � d � � � � Z�dل Z�dڄ Z�ejv �w d� ej� drdҦ � � � ejv �w d�ej� ej� g� � dۄ � � � � Z�ejv �w d� ej� dsdҦ � � � ejv �w d�ej� ej� ej� ej� g� � d܄ � � � � Z�dS )�� )�annotationsN)�contextmanager)�pickle)�Decimal)�rational)�assert_� assert_raises�assert_warns�assert_equal�assert_almost_equal�assert_array_equal�assert_raises_regex�assert_array_almost_equal�assert_allclose�IS_PYPY� IS_PYSTON�HAS_REFCOUNT�assert_array_less� runstring�temppath�suppress_warnings�break_cycles� _SUPPORTS_SVE)�requires_memory�_no_tracing)�CommaDecimalPointLocale)� repack_fields)�_get_ndarray_c_version)� timedelta�datetimec �� � t | | t j | � � � � t t j |� � t j t |� � � � � � d S �N)r �np�sort�arange�len)�arr�args �s/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/core/tests/test_multiarray.py�assert_arg_sortedr* , sL � ���S��2�7�3�<�<�(�(�(�������r�y��S���2�2�3�3�3�3�3� �Cc � � t j |� � }|t j t � � k r(|�t d� � �t j | ||�� � S |�|j }t | d� � s| f} t j t j | � � |j z }t j |d|z z dz t j � � }|j d d }||z }|dk r||z }|d|z z dk r||z }||||z dz � dd � }|� d� � t j | |||� � � }|S )z� Allocate a new ndarray with aligned memory. The ndarray is guaranteed *not* aligned to twice the requested alignment. Eg, if align=4, guarantees it is not aligned to 8. If align=None uses dtype.alignment.Nz$object array alignment not supported��dtype�order�__len__� � �datar ����r0 )r# r/ �object� ValueError�zeros� alignment�hasattr� functools�reduce�operator�mul�itemsize�empty�uint8�__array_interface__�fill�ndarray) �shaper/ r0 �align�size�buf�ptr�offsetr4 s r) �_aligned_zerosrL 2 sK � � �H�U�O�O�E����� � � � � ���C�D�D�D��x��U�%�8�8�8�8��}�����5�)�$�$� ������H�L�%�0�0�5�>�A�D� �(�4�!�E�'�>�A�%�r�x� 0� 0�C� � !�&� )�!� ,�C� �5�[�F� ��{�{������q��w��A����%��� �f�V�D�[��]�"� #�C�R�C� (�C��H�H�Q�K�K�K� �:�e�U�C�u�5�5�5�D��Kr+ c �� � e Zd Zd� Zd� Zd� Zd� Zd� Zej � ed�� � d� � � Zd � Z d � Zej � g d�g d�� � d � � � Zd� Zd� Zd� ZdS )� TestFlagsc �8 � t j d� � | _ d S �N� )r# r% �a��selfs r) �setup_methodzTestFlags.setup_methodW s � ���2������r+ c � � t � � }d| j j _ t t t d|� � t t t d|� � d| j j _ d| j d<