#NEWLINE# def test_rvs( self ) : #NEWLINE# #INDENT# vals = stats . nbinom . rvs ( 10 , 0.75 , size = ( 2 , 50 ) ) #NEWLINE# assert_ ( numpy . all ( ( vals >= 0 ) ) ) #NEWLINE# assert_ ( ( numpy . shape ( vals ) == ( 2 , 50 ) ) ) #NEWLINE# assert_ ( ( vals . dtype . char in typecodes [ 'AllInteger' ] ) ) #NEWLINE# val = stats . nbinom . rvs ( 10 , 0.75 ) #NEWLINE# assert_ ( isinstance ( val , int ) ) #NEWLINE# val = stats . nbinom ( 10 , 0.75 ) . rvs ( 3 ) #NEWLINE# assert_ ( isinstance ( val , numpy . ndarray ) ) #NEWLINE# assert_ ( ( val . dtype . char in typecodes [ 'AllInteger' ] ) )