관리-도구
편집 파일: test_nditer.cpython-311.pyc
� �܋f� � �� � d dl Z d dlZd dlZd dlZd dlZd dlmc mZ d dlm Z m Z mZmZ d dl mZmZmZmZmZmZmZmZ d� Zd� Zd� Zej � e d�� � d � � � Zd � Zd� Zd� Zd � Zd� Z ej � e d�� � d� � � Z!d� Z"d� Z#d� Z$d� Z%d� Z&d� Z'd� Z(d� Z)d� Z*d� Z+d� Z,d� Z-d� Z.d� Z/d� Z0d� Z1d � Z2d!� Z3d"� Z4d#� Z5d$� Z6d%� Z7d&� Z8d'� Z9d(� Z:d)� Z;d*� Z<d+� Z=d,� Z>d-� Z?ej �@ d.ejA d/ � � ej �@ d0ejA d/ � � ej �B d1� � d2� � � � � � � ZCd3� ZDd4� ZEd5� ZFd6� ZGd7� ZHd8� ZId9� ZJd:� ZKd;� ZLd<� ZMd=� ZNd>� ZOd?� ZPd@� ZQdA� ZRdB� ZSdC� ZTdD� ZUdE� ZVdF� ZWdG� ZXdH� ZYdI� ZZdJ� Z[dK� Z\ej � edL�� � ej � e dM�� � dN� � � � � Z]dO� Z^dP� Z_dQ� Z`dR� Zaej jb dS� � � ZcdT� Zd G dU� dV� � ZedW� ZfdX� ZgdY� ZhdZ� Zid[� Zjd\� Zkej �@ d] ejl d^d_�`� � ejl dad_�`� � dddb�dd�f ejl dcd_�`� � dddb�dd�dddb�dd�f ejl ddd_�`� � ddde� ejl dfd_�`� � dddb�dddg�f ejl dcd_�`� � dddb�dd�dddb�dddh�f g� � di� � � Zmej �@ djdkgddhd gf ejl dldm�`� � d dngf ejl dldm�`� � df ejl dodm�`� � dhd gf ejl dpdm�`� � dhdhgf ejl dpdm�`� � dfg� � dq� � � Zndr� Zods� Zpdt� Zqdu� Zrdv� Zsdw� Ztdx� Zudy� Zvej �@ dz ejw d{ex�`� � dd�dddb�dd�f ejw d{exd|�}� � dd�dddb�dd�f ejw d{ex�`� � dd�dddb�dd�f �y d|� � g� � d~� � � Zzd� Z{d�� Z|d�� Z}d�� Z~d�� Zd�� Z�ej � e d�� � d�� � � Z�ej � e j� ddb� d�k o e j� d�k d��� � ej �@ d�d�gg d��� � ej �@ d�g d��� � d�� � � � � � � Z�ej � e d�� � ej �@ d�d�gd�d�g� � d�� � � � � Z�d�� Z�dS )�� N)�array�arange�nditer�all)�assert_�assert_equal�assert_array_equal� assert_raises�IS_WASM�HAS_REFCOUNT�suppress_warnings�break_cyclesc � � g }| j s5|� | j � � | � � � | j �5|S �N)�finished�append�multi_index�iternext��i�rets �o/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/core/tests/test_nditer.py�iter_multi_indexr sE � � �C��j� �� � �1�=�!�!�!� � � ���� �j� � �J� c � � g }| j s5|� | j � � | � � � | j �5|S r )r r �indexr r s r �iter_indicesr sE � � �C��j� �� � �1�7���� � � ���� �j� � �Jr c � � g }| j s5|� | j � � | � � � | j �5|S r )r r � iterindexr r s r �iter_iterindicesr sE � � �C��j� �� � �1�;���� � � ���� �j� � �Jr zPython lacks refcounts)�reasonc �V � t d� � } t j d� � � � � }t j | � � }t j |� � }t | g ddggd|g�� � 5 }t |j � � t t j | � � |k � � t t j |� � |k � � d d d � � n# 1 swxY w Y d }t t j | � � |� � t t j |� � |� � t dd�� � } t j d� � }t j | � � }t j |� � }t | g dgg|g�� � }t j | � � }t j |� � }|� � � }t t j | � � |k � � t t j |� � |k � � d }t t j | � � |� � t t j |� � |� � d }t t j | � � |� � t t j |� � |� � ~d S ) N� �f4� readwrite�updateifcopy�unsafe��casting� op_dtypes��dtype�r* )r �npr, �newbyteorder�sys�getrefcountr r �iterationneedsapir �copy)�a�dt�rc_a�rc_dt�it�rc2_a�rc2_dt�it2s r �test_iter_refcountr<