
    Ui	                         d dl Z d dlZddlmZ e j                            dddddej        e ej	        d          dg          d	             Z
e j        j        d
             Zd ZdS )    N   )_get_outputdtypef4float32	complex64
complex128c                    d}t          j        |d          }| dn| }t          | |          }|j        |k    sJ |j        t          j        |          k    sJ t          | |d          }|j        dk    sJ |j        t          j        |          k    sJ t          j        ||           }t          ||          }||u sJ d S )Nr      r   )r   r   r   )shape)npzerosr   r   r   )r   r   input_expected_dtyperesultoutputs         {/var/www/development/aibuddy-work/election-extract/venv/lib/python3.11/site-packages/scipy/ndimage/tests/test_ni_support.pytest_get_output_basicr      s     EXe9---F #(-YYUN ''F<5    <28N333333 f555F<6!!!!<28N333333 Xe5)))F((FV    c                     d} t          j        |           }t          d |d          }|j        | k    sJ |j        t          j        d          k    sJ t          j        t          d          5  t          t          |d          }d d d            n# 1 swxY w Y   |j        | k    sJ |j        t          j        d          k    sJ t          d|d          }|j        | k    sJ |j        t          j        d          k    sJ d S )Nr   Tcomplex_outputr	   z+promoting specified output dtype to complexmatchr   )	r   r   r   r   r   pytestwarnsUserWarningfloat)r   r   r   s      r   test_get_output_complexr!   *   sh   EXe__F vd;;;F<5    <28L111111 
k)V	W	W	W A AUF4@@@A A A A A A A A A A A A A A A<5    <28L111111 fTBBBF<5    <28K00000000s   0BBBc                     t          j        dd          } t          j        t          d          5  t          d| d           d d d            n# 1 swxY w Y   t          j        t          d          5  t          t          j        d          | d           d d d            n# 1 swxY w Y   t          j        t          d          5  t          d|            d d d            n# 1 swxY w Y   t          j        t          d	          5  t          t          j        d
          |            d d d            d S # 1 swxY w Y   d S )Nr   r   zoutput must have complex dtyper   Tr   zoutput must have numeric dtypevoidzshape not correctr   )r   r   r   raisesRuntimeErrorr   )r   s    r   test_get_output_error_casesr&   A   sC   Xfi((F 
|+K	L	L	L < <Ivd;;;;< < < < < < < < < < < < < < <	|+K	L	L	L C CBHV$$fTBBBBC C C C C C C C C C C C C C C 
|+K	L	L	L $ $FF###$ $ $ $ $ $ $ $ $ $ $ $ $ $ $ 
|+>	?	?	? . .BHV$$f---. . . . . . . . . . . . . . . . . .sG   AAA6%B''B+.B+C**C.1C.#E  EE)r   numpyr   _ni_supportr   markparametrizer   r    r   r   thread_unsafer!   r&    r   r   <module>r-      s         % % % % % %  	il

E828D>>
 
 
 
0 1 1 1,. . . . .r   