관리-도구
편집 파일: utils.cpython-311.pyc
� �܋f�L � � � d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z m Z ddlZddlZddl mZmZ ddlmZ ddlmZ ddlZddlZddlZddlmZmZmZmZmZmZmZmZ ddlm Z m!Z!m"Z" ddl#Zdd l$m%Z% g d �Z& G d� de'� � Z(e(Z)dZ* ej+ � � d v Z,ej- j. dk Z/ e0ed� � Z1 e2edd� � duoe1 Z3ej4 j5 j6 Z7d� Z8dZ9 ej: d� � pdZ;de;v rdZ9dad�Z<ej. dk r dbd�Z=dcd�Z>n-ej dd� dk rd ej? � � � d �fd!�Z>nd"� Z>ej dd� dk rd ej? � � � d �g fd#�Z@ng fd$�Z@ ddd(�ZAded)�ZBd*� ZC ejD � � dfd,�� � ZE ejD � � dfd-�� � ZF ejD � � dgdd/�d0�� � ZGdedd/�d1�ZH ejD � � dhd2�� � ZIded3�ZJd4� ZKd5� ZLdid6�ZMd7� ZN eN� � ZOddlPZP G d8� d9ePjQ � � ZR eRd:� � ZSd;� ZTd<� ZUdjd=�ZVdkd?�ZWd@� ZX dldB�ZYdmdC�ZZdkdD�Z[djdE�Z\dF� Z]dG� Z^ej_ djdH�� � Z`dI� Zaej_ djdJ�� � ZbdK� ZcedLdMfdN�Zd G dO� dPe'� � Zeej_ dQ� � � Zfej_ dR� � � Zg G dS� dTejh � � Zi G dU� dV� � Zjej_ djdW�� � ZkdX� ZldY� ZmdZ� Znd[� Zod\� Zpd]� Zqd^� Zrd_� Zs es� � Ztd`� ZudS )nz* Utility function to facilitate testing. � N)�partial�wraps)�mkdtemp�mkstemp)�SkipTest)�WarningMessage)�intp�float32�empty�arange� array_repr�ndarray�isnat�array)�isfinite�isnan�isinf)�StringIO)*�assert_equal�assert_almost_equal�assert_approx_equal�assert_array_equal�assert_array_less�assert_string_equal�assert_array_almost_equal� assert_raises� build_err_msg�decorate_methods�jiffies�memusage�print_assert_equal�rundocs� runstring�verbose�measure�assert_�assert_array_almost_equal_nulp�assert_raises_regex�assert_array_max_ulp�assert_warns�assert_no_warnings�assert_allclose�IgnoreException�clear_and_catch_warningsr �KnownFailureException�temppath�tempdir�IS_PYPY�HAS_REFCOUNT�IS_WASM�suppress_warnings�assert_array_compare�assert_no_gc_cycles�break_cycles�HAS_LAPACK64� IS_PYSTON�_OLD_PROMOTION�IS_MUSL� _SUPPORTS_SVEc � � e Zd ZdZdS )r/ z<Raise this exception to mark a test as a known failing test.N��__name__� __module__�__qualname__�__doc__� � �o/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/testing/_private/utils.pyr/ r/ - s � � � � � �F�F��DrE r/ )�wasm32�wasm64�pypy�pyston_version_info�getrefcountc �0 � t j � � dk S )N�legacy)�np�_get_promotion_staterD rE rF �<lambda>rP ; s � ��0�2�2�h�>� rE F� HOST_GNU_TYPE� �muslTc �h � d}| s- |� � }n# t $ r |}Y nw xY wt |� � �dS )aI Assert that works in release mode. Accepts callable msg to allow deferring evaluation until failure. The Python built-in ``assert`` does not work when executing code in optimized mode (the ``-O`` flag) - no byte-code is generated for it. For documentation on usage, refer to the Python documentation. TN)� TypeError�AssertionError)�val�msg�__tracebackhide__�smsgs rF r&