PATH:
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
numpy
/
core
/
tests
/
__pycache__
/
Editing: test_casting_floatingpoint_errors.cpython-311.pyc
� � h� � � � d dl Z d dl mZ d dlmZ d dlZd� Zd� Ze j � ed�� � e j � dd g e� � � � e j � d � � d� � � � � � � ZdS )� N)�param)�IS_WASMc # �� K � t ddd�� � V � t ddd�� � V � t ddd�� � V � t t j d� � dd �� � V � t t j d� � dd �� � V � t t j d� � dd�� � V � t ddz d d�� � V � t dd d�� � V � t t j d� � d d �� � V � t t j d� � d d �� � V � t j t j � � j } t j t j t j d� � j d� � � � }| |z t j d� � j k r5t t j t j � � j dd�� � V � t ddd�� � V � t ddd�� � V � t ddd�� � V � t t j d� � dd�� � V � t j d�� � 5 t j d D ]t}t j t j fD ]Y}t j d D ]D}t j |� � }|� |� � }t |||� d |� ��� � V � �E�Z�u d!d!d!� � d!S # 1 swxY w Y d!S )"a? Generate value+dtype pairs that generate floating point errors during casts. The invalid casts to integers will generate "invalid" value warnings, the float casts all generate "overflow". (The Python int/float paths don't need to get tested in all the same situations, but it does not hurt.) ip �float16z int-to-f2)�id�70000z str-to-f2g �@zfloat-to-f2zlongdouble-to-f2zdouble-to-f2� �d �float32z int-to-f4g}Ô%�I�Tg�u �<�7~�f8r �float64zlongdouble-to-f8g�u �<�G~� complex64zfloat-to-c8y�u �<�G~ z complex-to-c8y �u �<�G~zlongdouble-to-c8�ignore)�over� AllInteger�AllFloatz-to-N)r �np� longdoubler r �finfo�max�spacing� nextafter�errstate� typecodes�inf�nan�dtype�type)�max_ldr �to_dt�value�from_dt�from_vals ��/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib64/python3.11/site-packages/numpy/core/tests/test_casting_floatingpoint_errors.py�values_and_dtypesr% s� � � � � ��y�[� 1� 1� 1�1�1�1� ���{� 3� 3� 3�3�3�3� ���}� 5� 5� 5�5�5�5� �� �f�%�%�y�5G� H� H� H�H�H�H� �� �6�"�"�I�.� A� A� A�A�A�A� �� �6�"�"�I�-� @� @� @�@�@�@� ��C���{� 3� 3� 3�3�3�3� ��y�]� 3� 3� 3�3�3�3� �� �e�$�$�i�4F� G� G� G�G�G�G� �� �5�!�!�9�� @� @� @�@�@�@� �X�b�m� $� $� (�F��j���b�h�t�n�n�&8�!�<�<�=�=�G� ���"�(�4�.�.�,�,�,��B�H�R�]�+�+�/��)�+� +� +� +� +� +� ��{�}� 5� 5� 5�5�5�5� ��+�/� :� :� :�:�:�:� ���� 8� 8� 8�8�8�8� �� �e�$�$�k�6H� I� I� I�I�I�I� ��(� #� #� #� N� N��\�,�/� N� N�E��&�"�&�)� N� N��!�|�J�7� N� N�G� �h�w�/�/�G�&�|�|�E�2�2�H���%�x�4L�4L�U�4L�4L�M�M�M�M�M�M�M� N� N� N�N� N� N� N� N� N� N� N� N� N� N� N���� N� N� N� N� N� Ns �BK+�+K/�2K/c # � � �K � � j dk r� �fd�}|V � � �fd�}|V � � �fd�}|V � � �fd�}|V � � �fd�}|V � � �fd�}|V � � �fd�}|V � � �fd �} | V � � �fd �} | V � � �fd�}|V � � �fd�}|V � � �fd �} | V � dS )z� There are many dedicated paths in NumPy which cast and should check for floating point errors which occurred during those casts. �ic �>