| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Python312/Lib/site-packages/numpy/f2py/tests/__pycache__/ |
Upload File : |
�
�g� � �J � d dl Z d dlZddlmZ G d� dej
� Zy)� N� )�utilc �
� e Zd Z ej dddd� ej dddd� ej dddd� ej dddd� ej dddd� ej dddd � gZej j d
� � Z ej j d� � Z
ej j d� � Zej j d
� � Zej j d� � Z
ej j d� � Zej j d� � Zej j d� � Zej j d� � Zd� Zd� Zd� Zy)�TestParameters�tests�src� parameterzconstant_real.f90zconstant_integer.f90zconstant_both.f90zconstant_compound.f90zconstant_non_compound.f90zconstant_array.f90c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y �N� ��dtype� � )� r r ) �np�arange�float32�pytest�raises�
ValueError�module�
foo_single�allclose��self�xs �AC:\Python312\Lib\site-packages\numpy/f2py/tests/test_parameter.py�test_constant_real_singlez(TestParameters.test_constant_real_single �x � �
�I�I�a�r�z�z�*�3�Q�3�/���
�
�j�$�+�+�"8�"8�!�<�
�I�I�a�r�z�z�*�������q�!��{�{�1�3�4�4�4� c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y r ) r r �float64r r r r �
foo_doubler r s r �test_constant_real_doublez(TestParameters.test_constant_real_double r r! c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y )Nr r
r r )�
r r ) r r �int32r r r r �foo_compound_intr r s r �test_constant_compound_intz)TestParameters.test_constant_compound_int) sx � �
�I�I�a�r�x�x�(��1��-���
�
�j�$�+�+�">�">��B�
�I�I�a�r�x�x�(�����$�$�Q�'��{�{�1�3�4�4�4r! c � � t j dt j �� }| j j |� t j
|g d�� sJ �y )N� r
)� r r r )r r r( r �foo_non_compound_intr r s r �test_constant_non_compound_intz-TestParameters.test_constant_non_compound_int4 s? � �
�I�I�a�r�x�x�(�����(�(��+��{�{�1�:�;�;�;r! c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y r ) r r r( r r r r �foo_intr r s r �test_constant_integer_intz(TestParameters.test_constant_integer_int; sx � �
�I�I�a�r�x�x�(��1��-���
�
�j�$�+�+�"5�"5�q�9�
�I�I�a�r�x�x�(�������A���{�{�1�3�4�4�4r! c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y r ) r r �int64r r r r �foo_longr r s r �test_constant_integer_longz)TestParameters.test_constant_integer_longF sx � �
�I�I�a�r�x�x�(��1��-���
�
�j�$�+�+�"6�"6��:�
�I�I�a�r�x�x�(�������Q���{�{�1�3�4�4�4r! c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y �Nr r
r r )� r r ) r r r# r r r r �foor r s r �test_constant_bothz!TestParameters.test_constant_bothQ st � �
�I�I�a�r�z�z�*�3�Q�3�/���
�
�j�$�+�+�/�/�1�5�
�I�I�a�r�z�z�*����������{�{�1�G�H�H�Hr! c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y r8 ) r r r# r r r r �foo_nor r s r �test_constant_nozTestParameters.test_constant_no\ sx � �
�I�I�a�r�z�z�*�3�Q�3�/���
�
�j�$�+�+�"4�"4�a�8�
�I�I�a�r�z�z�*�������1���{�{�1�G�H�H�Hr! c �l � t j dt j �� d d d� }t j t
| j j |� t j dt j �� }| j j |� t j |g d�� sJ �y r8 ) r r r# r r r r �foo_sumr r s r �test_constant_sumz TestParameters.test_constant_sumg sx � �
�I�I�a�r�z�z�*�3�Q�3�/���
�
�j�$�+�+�"5�"5�q�9�
�I�I�a�r�z�z�*�������A���{�{�1�G�H�H�Hr! c �h � t j dt j �� }t j dt j �� }| j j ||� }t j
|g d�� sJ �t j
|g d�� sJ �t j
|d� sJ �y )Nr r
� )� g�������?g�������?)rD g $@g 4@g >@g D@g 3@)r r r# r � foo_arrayr )r r �y�zs r �test_constant_arrayz"TestParameters.test_constant_arrayr s~ � ��I�I�a�r�z�z�*���I�I�a�r�z�z�*���K�K�!�!�!�Q�'���{�{�1�1�2�2�2��{�{�1�?�@�@�@��{�{�1�d�#�#�#r! c �� � t j dt j �� }| j j |� }t j
||j
dd�� � sJ �y )Nr r
)r r �F)�order)r r r# r �foo_array_any_indexr �reshape)r r rF s r �test_constant_array_any_indexz,TestParameters.test_constant_array_any_indexz sK � ��I�I�a�r�z�z�*���K�K�+�+�A�.���{�{�1�a�i�i��c�i�:�;�;�;r! c �F � | j j � }|dk( sJ �y )N� )r �foo_array_delimsr s r �test_constant_array_delimsz)TestParameters.test_constant_array_delims s � ��K�K�(�(�*���A�v�
�vr! N)�__name__�
__module__�__qualname__r �getpath�sourcesr �mark�slowr r% r* r/ r2 r6 r; r>