B «@`<ã@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ú;/tmp/pip-unpacked-wheel-ecq9wray/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)N)rrgr)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Úndim)r rrrÚ test_rand+s r#cCstj d¡}t|jdkƒdS)Nrr)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Ús