o
    h	                     @   sf   d dl Z d dlZddlmZ e jdddddejee	ddgd	d
 Z
e jjdd Zdd ZdS )    N   )_get_outputdtypef4float32	complex64
complex128c                 C   s   d}t j|dd}| d u rdn| }t| |}|j|ksJ |jt |ks'J t| |dd}|jdks5J |jt |ks?J t j|| d}t||}||u sQJ d S )Nr      r   )r   r
   r   )shape)npzerosr   r   r   )r   r   input_expected_dtyperesultoutput r   W/var/www/vscode/kcb/lib/python3.10/site-packages/scipy/ndimage/tests/test_ni_support.pytest_get_output_basic   s   

r   c                  C   s   d} t | }td |dd}|j| ksJ |jt dksJ tjtdd tt|dd}W d    n1 s8w   Y  |j| ksDJ |jt dksNJ td|dd}|j| ks\J |jt dksfJ 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   r   r   r   test_get_output_complex*   s   
r   c                  C   s  t dd} tjtdd td| dd W d    n1 sw   Y  tjtdd tt d| dd W d    n1 s@w   Y  tjtdd td|  W d    n1 s\w   Y  tjtd	d tt d
|  W d    d S 1 s|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   r   r   r   test_get_output_error_casesA   s   "r"   )r   numpyr   _ni_supportr   markparametrizer   r   r   r   thread_unsafer   r"   r   r   r   r   <module>   s    

