o 6˜¿a<ã@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ú9/usr/lib/python3/dist-packages/numpy/tests/test_matlib.pyÚ test_emptys rcCóFttj d¡t gd¢gd¢g¡ƒttj d¡t ddgg¡ƒdS)N©ré)çð?rrrr)rrrÚonesr r rrrrÚ test_ones ó  ÿÿ"rcCr)Nr)çrrrr)rrrÚzerosr r rrrrÚ test_zerosrrcCs0tjjdtd}t|t ddgddgg¡ƒdS)Nr)Údtyperr)rrÚidentityÚintrr r r rrrÚ test_identitys rcCsžtjjddtd}t|t gd¢gd¢gd¢g¡ƒ|jjs J‚|jj r&J‚tjjddtdd }t|t gd ¢gd ¢gd ¢g¡ƒ|jjrGJ‚|jj sMJ‚dS) Nrr)Úkr)rrr)rrr)rrréÚF)rÚorder)rrrr)rrrr)rrrr) rrÚeyerrr r ÚflagsÚ c_contiguousÚ f_contiguous)ÚxcÚxfrrrÚtest_eyesþ  þ r*cCótj d¡}t|jdkƒdS©Nrr)rrÚrandrÚndimr rrrÚ test_rand+ó r/cCr+r,)r rÚrandnrr.r rrrÚ test_randn0r0r2cCs>t d¡}tj |dd¡}t gd¢gd¢g¡}t||ƒdS)Nr!r)rrrrrrrr)r ÚarangerrÚrepmatÚarrayr)Úa1rÚyrrrÚ test_repmat5s  ÿr8)rr Ú numpy.matlibÚ numpy.testingrrrrrrr*r/r2r8rrrrÚs