
    ^MhB                        U d Z ddlmZ ddlZddlmZ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        j        e	j                            dee	          d
                         Zd ZdS )z3Test how the ufuncs in special handle nan inputs.

    )CallableN)assert_array_equalassert_suppress_warnings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         c/var/www/html/test/jupyter/venv/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                      5 }|                    t
          d           	 t                      5 }|                    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-floating point number truncated to an integerzgot z instead of nanT)err_msg)r   nanninr   filterRuntimeWarningDeprecationWarning	TypeErrorr   r   isnan)r"   argssupresr   s        r   test_nan_inputsr1   &   s    F9TXD			 


>B	D 	D 	D	"$$ "

-...dDk" " " " " " " " " " " " " " "  	 	 	
 
 
 
 
 
 
 
	
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 ~T"C(
%
%
%
%Crx}}dC888888sY   B/B A;/B;A?	?BA?	BB/
B B/B  B//B36B3c                     t                      5 } |                     t          d           t          j        t
          j        dd          }t          t          j        |                     d d d            d S # 1 swxY w Y   d S )Nr%      g      ?)	r   r)   r*   r   bdtrcr   r'   r   r-   )r/   r0   s     r   test_legacy_castr5   <   s    			 

>B	D 	D 	Dhrvq#&&	                 s   AA99A= A=)__doc__typingr   numpyr   numpy.testingr   r   r   r   scipy.specialspecialr   r   dictstr__annotations__r   r    UFUNCSUFUNC_NAMESr   thread_unsafeparametrizer1   r5    r!   r   <module>rD      s               H H H H H H H H H H        &(tCM" ' ' '&(S(]# ( ( (  $ "kmm  [999 9 :9 9(    r!   