Skip to content

Commit 7b334cf

Browse files
Removed sys.maxint from ctm's (int is unbounded in Python 3 stupid me)
1 parent 4a8487e commit 7b334cf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

turftopic/models/ctm.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import math
22
import random
3-
import sys
43
from typing import Optional, Union
54

65
import numpy as np
@@ -211,7 +210,7 @@ def fit(
211210
status.update("Extracting terms.")
212211
document_term_matrix = self.vectorizer.fit_transform(raw_documents)
213212
console.log("Term extraction done.")
214-
seed = self.random_state or random.randint(0, sys.maxint - 1)
213+
seed = self.random_state or random.randint(0, 10_000)
215214
torch.manual_seed(seed)
216215
pyro.set_rng_seed(seed)
217216
device = torch.device(

0 commit comments

Comments
 (0)