o 6a @s2ddlZddlmZmZmZmZGdddZdS)N)assert_assert_array_equalassert_allclosesuppress_warningsc@steZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZdS)TestRegressioncCs4tjjgdgdd}ttj|gdgdS)N)rr)rrrrrrrrmask)rrr )npma masked_arrayrnonzero)selfxr@/usr/lib/python3/dist-packages/numpy/ma/tests/test_regression.pytest_masked_array_creates z'TestRegression.test_masked_array_createcCstjjddgddS)Nrr )rrarrayrrrrtest_masked_arraysz TestRegression.test_masked_arraycCs>ddlm}m}td}t|j|}|||}||dS)Nr) masked_whereMaskType)rr)numpy.marrrzerosshape)rrrabcrrrtest_mem_masked_wheres    z$TestRegression.test_mem_masked_wherecCs6tjd}tjj|d<td}||||dS)N)r r)rr)r r)rrrmaskedrr!r"rrrtest_masked_array_multiplys    z)TestRegression.test_masked_array_multiplycCstjjdgddddS)NrFr )rrrrepeatrrrrtest_masked_array_repeat"sz'TestRegression.test_masked_array_repeatcCsttjddS)NUnicode)reprrrrrrrrtest_masked_array_repr_unicode&sz-TestRegression.test_masked_array_repr_unicodecCsFtjjgdgdd}t|}t|jjdkt|jjdkdS)N)gg333333?g @)FTFr rr)rrr atleast_2drrndimr&rrrtest_atleast_2d*s zTestRegression.test_atleast_2dcCs0tjjgdgdd}d|_t|jdkdS)N)r!r"r#)rrrr X)rrr fill_valuer)rr!rrrtest_set_fill_value_unicode_py31sz.TestRegression.test_set_fill_value_unicode_py3cCsDtjjtddd}tjjdtd}|j|dt|jdkdS)Nr Tr dtype)outr)rrrarangefloatvarr_data)rr!moutrrr test_var_sets_maskedarray_scalar7s z/TestRegression.test_var_sets_maskedarray_scalarcCstjgdd}tgd}t(}|tdtjj||dd}tjj||dd}t|j |j WddS1s>wYdS)N)rrr r r r )rg@g@r r zbias and ddof have no effectr)ddofr) rr masked_equalrrfilterDeprecationWarningcorrcoefrdata)rrysupr0r1rrrtest_ddof_corrcoef>s "z!TestRegression.test_ddof_corrcoefcCsftjjddgddgd}t|jjdkt|d}t|jjdkt|jdkt|jjdkdS)N?@Fr )r)rrrr)rr MaskedArrayrrr tiler&rrrtest_mask_not_backmangledJs  z(TestRegression.test_mask_not_backmangledcCs.tjjgddd}t|g|dddS)N))rrI)rrJ)r g@zi4,f4r5r)rrrLrrrrrrtest_empty_list_on_structuredTsz,TestRegression.test_empty_list_on_structuredcCs.tjdd}t|jdd|jdS)Nr rKF)order)rrr8reshapertobytesTrOrrr!test_masked_array_tobytes_fortranYsz0TestRegression.test_masked_array_tobytes_fortranN)__name__ __module__ __qualname__rrr$r'r*r-r0r3r=rHrNrPrVrrrrrs  r)numpyr numpy.testingrrrrrrrrrs