Closed amiltonwong closed 6 years ago
There is no numpy.random.choices
, but there is arandom.choices
. See link
It's written in Python 3.
Change that line to
return ''.join(random.choice(string.ascii_uppercase + string.digits))
and run it via Python 2.
random.choices is available in python 3.6. i think you can use random.sample instead. ''.join(random.sample(string.ascii_uppercase + string.digits, k=n))
But sample gives elements without replacement whereas choices gives elements with replacement. Not sure if this affects the prediction accuracy of the model though!
Hi, @bfortuner ,
I found a strange term
random.choices
in this line. There is no random.choices (link) . Is it a typo or have special meaning?