
    Pi                         U d Z ddlZddlmZ ddlZddlmZmZ ddl	Z	ddl
mZ i Zeeef         ed<   i Zeeef         ed<   d Z e            \  ZZe	j                            dee	          d
             Zd ZdS )z3Test how the ufuncs in special handle nan inputs.

    N)Callable)assert_array_equalassert_KNOWNFAILURESPOSTPROCESSINGc                     g } g }t          t          j                  D ]}t          j        |         }t          |t          j                  s/t                              |          }|+|                     |           |                    |           vt          j
                            d|          }|                     t          j        ||                     |                    |           | |fS )NF)runreason)marks)sortedsc__dict__
isinstancenpufuncr   getappendpytestmarkxfailparam)ufuncsufunc_namesnameobjmsgfails         w/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/scipy/special/tests/test_nan_inputs.py_get_ufuncsr      s    FKr{## % %k$#rx(( 	$$;MM#t$$$$;$$s$;;DMM&,s$777888t$$$$;    func)idsc                    t           j        f| j        z  }t          j                    5  t          j        ddt                     	 t          j                    5  t          j        dt                      | | }d d d            n# 1 swxY w Y   n# t          $ r Y d d d            d S w xY wd d d            n# 1 swxY w Y   | t          v rt          |          | }d| d}t          t          j        |          d|           d S )Nignore-floating point number truncated to an integerzgot z instead of nanT)err_msg)r   nanninwarningscatch_warningsfilterwarningsRuntimeWarningsimplefilterDeprecationWarning	TypeErrorr   r   isnan)r!   argsresr   s       r   test_nan_inputsr3   (   s   F9TXD		 	"	"  ;	
 	
 	

	(** " "%h0BCCCdDk" " " " " " " " " " " " " " "  	 	 	       	               ~T"C(
%
%
%
%Crx}}dC888888sY   B9B B9BB			BB		BB9
B*B9)B**B99B= B=c                     t          j                    5  t          j        ddt                     t	          j        t          j        dd          } t          t          j	        |                      d d d            d S # 1 swxY w Y   d S )Nr$   r%      g      ?)
r)   r*   r+   r,   r   bdtrcr   r'   r   r0   )r2   s    r   test_legacy_castr7   @   s    		 	"	"  ;	
 	
 	

 hrvq#&&                 s   AA>>BB)__doc__r)   collections.abcr   numpyr   numpy.testingr   r   r   scipy.specialspecialr   r   dictstr__annotations__r   r   UFUNCSUFUNC_NAMESr   parametrizer3   r7    r    r   <module>rE      s      $ $ $ $ $ $     5 5 5 5 5 5 5 5        &(tCM" ' ' '&(S(]# ( ( (  $ "kmm  [999 9 :99.    r    