1j" d Z ddlZddlZddlZddlmZ ej dd d Zej ed d Zej dej d d Zej dej d d Zej dej ej ej g d Zd Zd Zd Zd Zej dej ej g ej dddg d Zd ZdS )z This file adds basic tests to test the NEP 50 style promotion compatibility mode. Most of these test are likely to be simply deleted again once NEP 50 is adopted in the main test suite. A few may be moved elsewhere. N)IS_WASMmoduleT)scopeautousec # K t j } t j d d V t j | d S )N weak_and_warn)np_get_promotion_state_set_promotion_state)states z/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib64/python3.11/site-packages/numpy/core/tests/test_nep50_promotions.py_weak_promotion_enabledr sE #%%EO,,, EEEE""""" z'wasm doesn't have support for fp errors)reasonc t j t d 5 t j d dz } d d d n# 1 swxY w Y | j t j k sJ t j t d 5 t j dgt j t j d z } d d d n# 1 swxY w Y | j t j k sJ t j t d 5 t j dgt j t j dt j z } d d d n# 1 swxY w Y | j t j k sJ t j t d 5 t j d 5 t j d d z } d d d n# 1 swxY w Y d d d n# 1 swxY w Y | j t j k sJ t j t 5 }t j d d z } d d d n# 1 swxY w Y t | t j }| d sJ t | t j }| d sJ t! | dk sJ t j | sJ | j t j k sJ t j d gt j t j d k } | d dk sJ t j t d 5 t j d gt j t j d z } d d d n# 1 swxY w Y | j t j k sJ t j t d 5 t j dgt j t j d z } d d d n# 1 swxY w Y | j t j k sJ d S )Nresult dtype changedmatch dtyperaiseoverd g;%_nToverflowr g?F ? )pytestwarnsUserWarningr uint8r arrayint64errstateWarningfloat32strpopmessage startswithRuntimeWarninglenisinffloat64)resrecwarnwarnings r test_nep50_examplesr5 s k)? @ @ @ hqkkAo 9 k)? @ @ @ 4 4hsBH%%34 4 4 4 4 4 4 4 4 4 4 4 4 4 49 k)? @ @ @ D DhsBH%%"((C(C(CCD D D D D D D D D D D D D D D9 k)? @ @ @ &