zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
U
P±da ã@s2ddlZddlmZmZmZmZGdd„dƒZdS)éN)Úassert_Úassert_array_equalÚassert_allcloseÚsuppress_warningsc@steZdZdd„Zdd„Zdd„Zdd„Zd    d
„Zd d „Zd d„Z    dd„Z
dd„Z dd„Z dd„Z dd„Zdd„ZdS)ÚTestRegressionc
CsPtjjddddddddgddddddddgd}ttj |¡dddd    ggƒdS)
Nréééééé©Úmaské)ÚnpÚmaÚ masked_arrayrZnonzero)ÚselfÚx©rúUd:\z\workplace\vscode\pyvenv\venv\Lib\site-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)Znumpy.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)rrrZmasked©rrr 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)NZUnicode)ÚreprrrrrrrrÚtest_masked_array_repr_unicode&sz-TestRegression.test_masked_array_repr_unicodecCsJtjjdddgdddgd}t |¡}t|jjdkƒt|jjdkƒdS)    Ngg333333ó?g @FTr rr)rrrZ
atleast_2drrÚndimr#rrrÚtest_atleast_2d*s
zTestRegression.test_atleast_2dcCs4tjjdddgdddgd}d|_t|jdkƒdS)Nrr r!rrr ÚX)rrrZ
fill_valuer)rrrrrÚtest_set_fill_value_unicode_py31sz.TestRegression.test_set_fill_value_unicode_py3cCsDtjjt d¡dd}tjjdtd}|j|dt|jdkƒdS)Nr Tr éÿÿÿÿ©Zdtype)Úoutr)rrrÚarangeÚfloatÚvarrÚ_data)rrZmoutrrrÚ test_var_sets_maskedarray_scalar7s z/TestRegression.test_var_sets_maskedarray_scalarc    Cs€tj dddddgd¡}t dddddg¡}tƒD}| td¡tjj||d    d
}tjj||dd
}t|j    |j    ƒW5QRXdS) Nrrr    r
r g@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ƒt |d¡}t|jjdkƒt|jdkƒt|jjdkƒdS)Nçð?ç@Fr )r)rr©rr)rrÚ MaskedArrayrrrZtiler#rrrÚtest_mask_not_backmangledJs  z(TestRegression.test_mask_not_backmangledcCs0tjjdddgdd}t|g|dd…ƒdS)N)rr<)rr=)r    g@zi4,f4r/r)rrr?r©rrrrrÚtest_empty_list_on_structuredTsz,TestRegression.test_empty_list_on_structuredcCs.tj d¡ d¡}t|jdd|j ¡ƒdS)Nr
r>ÚF)Úorder)rrr1ZreshaperÚtobytesÚTrArrrÚ!test_masked_array_tobytes_fortranYsz0TestRegression.test_masked_array_tobytes_fortranN)Ú__name__Ú
__module__Ú __qualname__rrr"r$r'r)r+r-r5r;r@rBrGrrrrrs 
r)ÚnumpyrZ numpy.testingrrrrrrrrrÚ<module>s