HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/numpy/ma/tests/__pycache__/test_regression.cpython-310.pyc
o

���g��@s2ddlZddlmZmZmZmZGdd�d�ZdS)�N)�assert_�assert_array_equal�assert_allclose�suppress_warningsc@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�TestRegressioncCs4tjjgd�gd�d�}ttj�|�gd�g�dS)N)r���r���)rrrrrrrr��mask)rrr�)�np�ma�masked_arrayr�nonzero)�self�x�r�I/usr/local/lib/python3.10/dist-packages/numpy/ma/tests/test_regression.py�test_masked_array_creates�z'TestRegression.test_masked_array_createcCstjjddgd�dS)Nrr
)rr�array�rrrr�test_masked_arraysz TestRegression.test_masked_arraycCs>ddlm}m}t�d�}t�|j|�}|||�}||dS)Nr)�masked_where�MaskType)rr)�numpy.marrr�zeros�shape)rrr�a�b�crrr�test_mem_masked_wheres


z$TestRegression.test_mem_masked_wherecCs6tj�d�}tjj|d<t�d�}||||dS)N)r
r)rr)r
r)rrr�masked�rr!r"rrr�test_masked_array_multiplys

z)TestRegression.test_masked_array_multiplycCstjjdgdd��d�dS)NrFr
�
)rrr�repeatrrrr�test_masked_array_repeat"sz'TestRegression.test_masked_array_repeatcCsttj�d��dS)N�Unicode)�reprrrrrrrr�test_masked_array_repr_unicode&sz-TestRegression.test_masked_array_repr_unicodecCsFtjjgd�gd�d�}t�|�}t|jjdk�t|jjdk�dS)N)gg333333�?g@)FTFr
rr)rrr�
atleast_2drr�ndimr&rrr�test_atleast_2d*s
zTestRegression.test_atleast_2dcCs0tjjgd�gd�d�}d|_t|jdk�dS)N)r!r"r#)rrrr
�X)rrr�
fill_valuer)rr!rrr�test_set_fill_value_unicode_py31sz.TestRegression.test_set_fill_value_unicode_py3cCsDtjjt�d�dd�}tjjdtd�}|j|d�t|jdk�dS)NrTr
�����dtype)�outr)rrr�arange�float�varr�_data)rr!�moutrrr� test_var_sets_maskedarray_scalar7sz/TestRegression.test_var_sets_maskedarray_scalarcCs�tj�gd�d�}t�gd��}t��(}|�td�tjj||dd�}tjj||dd�}t|j	|j	�Wd�dS1s>wYdS)N)rrr	r
rr
)rg@g������@r	rzbias and ddof have no effectr)�ddofr)
rr�masked_equalrr�filter�DeprecationWarning�corrcoefr�data)rr�y�sup�r0�r1rrr�test_ddof_corrcoef>s"�z!TestRegression.test_ddof_corrcoefcCsftjjddgddgd�}t|jjdk�t�|d�}t|jjdk�t|jdk�t|jjdk�dS)N��?�@Fr
)r)rr�rr)rr�MaskedArrayrrr �tiler&rrr�test_mask_not_backmangledJsz(TestRegression.test_mask_not_backmangledcCs.tjjgd�dd�}t|g|dd��dS)N))rrI)rrJ)r	g@zi4,f4r5r)rrrLr�rrrrr�test_empty_list_on_structuredTsz,TestRegression.test_empty_list_on_structuredcCs.tj�d��d�}t|jdd�|j���dS)Nr
rK�F)�order)rrr8�reshaper�tobytes�TrOrrr�!test_masked_array_tobytes_fortranYsz0TestRegression.test_masked_array_tobytes_fortrancCs2tjjddtjfddtjfdtjfgfgd�dS)N)r)�rWrrD�i�jr5)rrr�int_�voidrrrr�test_structured_array]s
�
�z$TestRegression.test_structured_arrayN)�__name__�
__module__�__qualname__rrr$r'r*r-r0r3r=rHrNrPrVr\rrrrrs
r)�numpyr�
numpy.testingrrrrrrrrr�<module>s