File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ def skipgrams(
365365 random .shuffle (words )
366366
367367 couples += [
368- [words [i % len (words )], random .randint (1 , vocabulary_size - 1 )]
368+ [words [i % len (words )], random .randint (1 , int ( vocabulary_size - 1 ) )]
369369 for i in range (num_negative_samples )
370370 ]
371371 if categorical :
@@ -375,7 +375,7 @@ def skipgrams(
375375
376376 if shuffle :
377377 if seed is None :
378- seed = random .randint (0 , 10e6 )
378+ seed = random .randint (0 , int ( 10e6 ) )
379379 random .seed (seed )
380380 random .shuffle (couples )
381381 random .seed (seed )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def _prepare_directory(
3333 ):
3434 # Get a unique temp directory
3535 temp_dir = os .path .join (
36- self .get_temp_dir (), str (random .randint (0 , 1e6 ))
36+ self .get_temp_dir (), str (random .randint (0 , int ( 1e6 ) ))
3737 )
3838 os .mkdir (temp_dir )
3939 self .addCleanup (shutil .rmtree , temp_dir )
You can’t perform that action at this time.
0 commit comments