HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/numpy/ma/tests/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/numpy/ma/tests/__pycache__/test_regression.cpython-36.pyc
3

���h�@s2ddlZddlmZmZmZmZGdd�d�ZdS)�N)�assert_�assert_array_equal�assert_allclose�suppress_warningsc@steZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�TestRegressionc
CsPtjjddddddddgddddddddgd�}ttjj|�dddd	gg�dS)
Nr������)�mask�)�np�ma�masked_arrayrZnonzero)�self�x�r�?/tmp/pip-build-5_djhm0z/numpy/numpy/ma/tests/test_regression.py�test_masked_array_createsz'TestRegression.test_masked_array_createcCstjjddgd�dS)Nr)r
)rr�array)rrrr�test_masked_arraysz TestRegression.test_masked_arraycCs>ddlm}m}tjd�}tj|j|�}|||�}||dS)Nr)�masked_where�MaskTyper)rr)Znumpy.marrr�zeros�shape)rrr�a�b�crrr�test_mem_masked_wheres


z$TestRegression.test_mem_masked_wherecCs6tjjd�}tjj|d<tjd�}||||dS)Nr
rrr)r
r)rr)r
r)rrrZmasked)rrrrrr�test_masked_array_multiplys

z)TestRegression.test_masked_array_multiplycCstjjdgdd�jd�dS)NrF)r
�
)rrr�repeat)rrrr�test_masked_array_repeat"sz'TestRegression.test_masked_array_repeatcCsttjjd��dS)NZUnicode)�reprrrr)rrrr�test_masked_array_repr_unicode&sz-TestRegression.test_masked_array_repr_unicodecCsJtjjdddgdddgd�}tj|�}t|jjdk�t|jjdk�dS)	Ngg333333�?g@FT)r
rr)rrrZ
atleast_2drr
�ndim)rrrrrr�test_atleast_2d*s
zTestRegression.test_atleast_2dcCs4tjjdddgdddgd�}d|_t|jdk�dS)Nrrrrr)r
�X)rrrZ
fill_valuer)rrrrr�test_set_fill_value_unicode_py31sz.TestRegression.test_set_fill_value_unicode_py3cCsDtjjtjd�dd�}tjjdtd�}|j|d�t|jdk�dS)	NrT)r
r)�dtype)�outr���)rrr�arange�float�varr�_data)rrZmoutrrr� test_var_sets_maskedarray_scalar7sz/TestRegression.test_var_sets_maskedarray_scalarcCs�tjjdddddgd�}tjdddddg�}t��D}|jtd�tjj||d	d
�}tjj||dd
�}t|j	|j	�WdQRXdS)Nrrr	r
rg@g������@zbias and ddof have no effectr)Zddof)
rrZmasked_equalrr�filter�DeprecationWarningZcorrcoefr�data)rr�y�supZr0Zr1rrr�test_ddof_corrcoef>sz!TestRegression.test_ddof_corrcoefcCsftjjddgddgd�}t|jjdk�tj|d�}t|jjd	k�t|jd
k�t|jjdk�dS)Ng�?g@F)r
rr)r)rr)r)rr)rr)rr�MaskedArrayrr
rZtile)rrrrrr�test_mask_not_backmangledJsz(TestRegression.test_mask_not_backmangledcCs0tjjd
ddgdd�}t|g|dd	��dS)
Nr��?r�@r	�@zi4,f4)r+r)rr;)rr<)r	r=)rrr9r)rrrrr�test_empty_list_on_structuredTsz,TestRegression.test_empty_list_on_structuredcCs.tjjd�jd�}t|jdd�|jj��dS)Nr
r�F)�order)rr)rrr.Zreshaper�tobytes�T)rrrrr�!test_masked_array_tobytes_fortranYsz0TestRegression.test_masked_array_tobytes_fortranN)�__name__�
__module__�__qualname__rrr r!r$r&r(r*r2r8r:r>rCrrrrrs
r)ZnumpyrZ
numpy.testingrrrrrrrrr�<module>s