You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the dtype is specified in the call to numpy.random.randint, we should set the default value for low based on the datatype. Currently the call does not support creating random int just by specifying the datatype of the random value.
RAND_MAPPING = {
'TINYINT': np.random.randint(dtype=np.int8),
'SMALLINT': np.random.randint(dtype=np.int16)
}
for k in range(20):
print(RAND_MAPPING['TINYINT'])
Error stack -
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-79-67fec5a70990> in <module>()
12
13 RAND_MAPPING = {
---> 14 'TINYINT': np.random.randint(dtype=np.int8),
15 'SMALLINT': np.random.randint(dtype=np.int16)
16 }
mtrand.pyx in mtrand.RandomState.randint()
TypeError: randint() takes at least 1 positional argument (0 given)
We should be able to generate random number just specifying datatype.
The text was updated successfully, but these errors were encountered:
When the dtype is specified in the call to numpy.random.randint, we should set the default value for low based on the datatype. Currently the call does not support creating random int just by specifying the datatype of the random value.
Error stack -
We should be able to generate random number just specifying datatype.
The text was updated successfully, but these errors were encountered: