o
    0c#                     @   sl   d dl mZ d dlmZ ddlmZmZ ddlmZmZ ddl	m
Z
mZmZmZ dd Zd	d
 Zdd ZdS )    )getfullargspec)assert_raises   )asarray_elementwise_functions)bitwise_left_shiftbitwise_right_shift)_dtype_categories_boolean_dtypes_floating_dtypes_integer_dtypesc                 C   s   t t| jS N)lenr   args)func r   f/var/www/html/gps/gps/lib/python3.10/site-packages/numpy/array_api/tests/test_elementwise_functions.pynargs   s   r   c                     s  i ddddddddddddd	dd
dddddddddddddddddddi ddddddddddddddddddd dd!dd"dd#dd$dd%dd&dd'di d(dd)dd*d+d,d+d-d+d.d+d/dd0dd1dd2dd3dd4dd5dd6dd7dd8dd9ddddddd:} d;d< }| D ]E|   D ]>\}}t| }tt| t d=kr| D ]j|vsֈj|vrtt fd>d? qqj|vrtt fd@d? qqd S )ANabsnumericacoszfloating-pointacoshaddasinasinhatanatan2atanhbitwise_andzinteger or booleanbitwise_invertr   integer
bitwise_orr   bitwise_xorceilcoscoshdivideequalallexpexpm1floorfloor_dividegreatergreater_equalisfiniteisinfisnanless
less_equallog	logaddexplog10log1plog2logical_andbooleanlogical_not
logical_orlogical_xormultiplynegative	not_equalpositivepow	remainderroundsignsinsinhsqrt)squaresubtracttantanhtruncc                  s   sN    t D ]	} td| dV  qtD ]	} td| dV  qtD ]	} td| dV  qd S )N   )dtypeFg      ?)r   r   r
   r   )dr   r   r   _array_valsS   s   z(test_function_types.<locals>._array_valsr   c                      s
    S r   r   r   r   xyr   r   <lambda>b   s   
 z%test_function_types.<locals>.<lambda>c                      s    S r   r   r   )r   rS   r   r   rU   e   s    )itemsr	   getattrr   r   rO   r   	TypeError) elementwise_function_input_typesrQ   	func_nametypesdtypesr   rR   r   test_function_types   s   	
 !"#$%&'()*+,-./01234;



r]   c                   C   s    t tdd  t tdd  d S )Nc                   S      t tddgtddgS NrN   )r   r   r   r   r   r   rU   k       z*test_bitwise_shift_error.<locals>.<lambda>c                   S   r^   r_   )r   r   r   r   r   r   rU   n   ra   )r   
ValueErrorr   r   r   r   test_bitwise_shift_errorh   s   rc   N)inspectr   numpy.testingr    r   r   r   r   _dtypesr	   r
   r   r   r   r]   rc   r   r   r   r   <module>   s    U