| 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 : C:/Python312/Lib/site-packages/pandas/tests/frame/methods/__pycache__/ |
Upload File : |
�
/ �g � �N � d dl Zd dlmc mZ d dlmZmZ d dl m
Z G d� d� Zy)� N)� DataFrame� Timestampc �B � e Zd Zd� Zd� Zej d� � Zd� Zy)�TestToNumpyc � � t ddgddgd�� }t j ddgddgg� }|j � }t j
||� y )N� � � � @��A�B�r �np�array�to_numpy�tm�assert_numpy_array_equal��self�df�expected�results �JC:\Python312\Lib\site-packages\pandas/tests/frame/methods/test_to_numpy.py�
test_to_numpyzTestToNumpy.test_to_numpy
sO � �
�a��V�1�c�(�3�
4���8�8�a��V�a��X�.�/�������
�#�#�F�H�5� c � � t ddgddgd�� }t j ddgddggd�� }|j d�� }t j
||� y ) Nr r r
r r � �int64��dtyper r s r �test_to_numpy_dtypezTestToNumpy.test_to_numpy_dtype sV � �
�a��V�1�c�(�3�
4���8�8�a��V�a��V�,�G�<�����7��+��
�#�#�F�H�5r c � � t j j d� j d� }t |� }|rN|j
j |usJ �|j d�� j |j
j u s<J �|j
j |u sJ �|j d�� j |u sJ �|j d�� j |usJ �|r5|j d�� j |j
j u sJ �y |j dt j �� j |u sJ �y )Nr )r r
F)�copyT)r$ �na_value) r �random�default_rng�standard_normalr �values�baser �nan)r �using_copy_on_write�arrr s r �test_to_numpy_copyzTestToNumpy.test_to_numpy_copy s � ��i�i�#�#�A�&�6�6�v�>��
�s�^����9�9�>�>��,�,�,��;�;�E�;�*�/�/�2�9�9�>�>�A�A�A��9�9�>�>�S�(�(�(��;�;�E�;�*�/�/�3�6�6�6��{�{��{�%�*�*�#�5�5�5� ��;�;�E�;�*�/�/�2�9�9�>�>�A�A�A��;�;�E�B�F�F�;�;�@�@�C�G�G�Gr c �� � t t d� dgg� }|j t �� }t j
ddggt �� }t
j ||� y )Nz2020-01-01 00:00:00g Y@r z100.0)r r r �strr r r r )r r r r s r � test_to_numpy_mixed_dtype_to_strz,TestToNumpy.test_to_numpy_mixed_dtype_to_str, sS � �
��#8�9�5�A�B�
C�����3��'���8�8�3�W�=�>�c�J��
�#�#�F�H�5r N) �__name__�
__module__�__qualname__r r"