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(
365
365
random .shuffle (words )
366
366
367
367
couples += [
368
- [words [i % len (words )], random .randint (1 , vocabulary_size - 1 )]
368
+ [words [i % len (words )], random .randint (1 , int ( vocabulary_size - 1 ) )]
369
369
for i in range (num_negative_samples )
370
370
]
371
371
if categorical :
@@ -375,7 +375,7 @@ def skipgrams(
375
375
376
376
if shuffle :
377
377
if seed is None :
378
- seed = random .randint (0 , 10e6 )
378
+ seed = random .randint (0 , int ( 10e6 ) )
379
379
random .seed (seed )
380
380
random .shuffle (couples )
381
381
random .seed (seed )
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def _prepare_directory(
33
33
):
34
34
# Get a unique temp directory
35
35
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 ) ))
37
37
)
38
38
os .mkdir (temp_dir )
39
39
self .addCleanup (shutil .rmtree , temp_dir )
You can’t perform that action at this time.
0 commit comments