o 6a @s8ddlZddlmZmZddlmZddZddZdS)N)assert_array_equalassert_array_compare) SeedSequencec Cs*gdgdgdgdgdgdgdgdgd gd g }gd gd gd gdgdgdgdgdgdgdg }ddgddgddgddgddgdd gd!d"gd#d$gd%d&gd'd(gg }t|||D],\}}}tj|tjd)}t|}|t|}t|||jt|tjd)}t||qfd*S)+z Check that SeedSequence generates data the same as the C++ reference. https://gist.github.com/imneme/540829265469e673d045 )l>[=iʭ i ixV4)lAM5llpi1 cl^<1)i lO!piF6iiM)i(lNwUi]e+ivp2p)iv(oiflFNiti)lml- i i5)i^wClx{l9lI6;)i|Il-Keri |Lir)lgT<>irT"lojlPJ)lbIlxWls-_`idf3)lMRib"ln,l= )lu l 8iKjQlb<)lS(lE{|iH5lDl!bJ<)i٦Sl ,ikLi&W)i@l;:i>f!l'4)lllDi2lz9e)l4lKp`la$i^ )i)9l'tMinpiRp)l2DZiAlDIi~G)i55l\|ih l^rlMRln,swM'lu 2R,` lKZ"Rq lS(iq lH5+q lYM'0 lk=Rl|Dl>BWP ll]_lek l4.Ala${EPl`SrP7lK`EJ+l2DZe8NlDIx;Bl55T#LsNplh x! dtypeN) zipnparrayuint32rgenerate_statelenruint64) inputsoutputs outputs64seedexpected expected64ssstatestate64rG/usr/lib/python3/dist-packages/numpy/random/tests/test_seed_sequence.pytest_reference_datasR     rcCsrtd}td}ttj|d|dtjgdtjd}ttdd|ttjtdddd|dS) zD Ensure that the implicit zero-padding does not cause problems. *l)l lm.<>iyls*r)r) spawn_keyN)rrr not_equalr r r r)ss0ss1 expected42rrrtest_zero_padding9s  r!) numpyr numpy.testingrr numpy.randomrrr!rrrrs   2