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
U
P±dvã@sdddlZddlZddlmZmZdd„Zdd„Zdd„Zd    d
„Z    d d „Z
d d„Z dd„Z dd„Z dS)éN)Úassert_array_equalÚassert_cCs,tj d¡}tt|tjƒƒt|jdƒdS)N)é)ér)ÚnumpyÚmatlibÚemptyrÚ
isinstanceÚnpÚmatrixÚshape©Úx©rúNd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\numpy/tests/test_matlib.pyÚ
test_emptys rcCsJttj d¡t dddgdddgg¡ƒttj d¡t ddgg¡ƒdS)N©régð?r)rrrZonesr
r rrrrÚ    test_ones
s   ÿÿrcCsJttj d¡t dddgdddgg¡ƒttj d¡t ddgg¡ƒdS)Nrgr)rrrÚzerosr
r rrrrÚ
test_zeross   ÿÿrcCs0tjjdtd}t|t ddgddgg¡ƒdS)Nr)Údtyperr)rrÚidentityÚintrr
r r rrrÚ test_identitysrc
Cs°tjjddtd}t|t dddgdddgdddgg¡ƒ|jjsFt    ‚|jj
rRt    ‚tjjddtdd}t|t ddddgddddgddddgg¡ƒ|jjr t    ‚|jj
s¬t    ‚dS)Nrr)ÚkrréÚF)rÚorder) rrZeyerrr
r ÚflagsÚ c_contiguousÚAssertionErrorÚ f_contiguous)ZxcZxfrrrÚtest_eyesþ  
 
þ r#cCstj d¡}t|jdkƒdS©Nrr)rrZrandrÚndimr rrrÚ    test_rand+s r&cCstj d¡}t|jdkƒdSr$)r
rZrandnrr%r rrrÚ
test_randn0s r'c CsVt d¡}tj |dd¡}t ddddddddgddddddddgg¡}t||ƒdS)Nrrrrr)r
ZarangerrZrepmatÚarrayr)Za1rÚyrrrÚ test_repmat5s 
ÿr*)rr
Z numpy.matlibZ numpy.testingrrrrrrr#r&r'r*rrrrÚ<module>s