Skip to content

Commit 02e1126

Browse files
committed
MAINT Use six.integer_types instead, HT @colcarrol
1 parent 93f282c commit 02e1126

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: pymc3/sampling.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from collections import defaultdict, Iterable
22
import pickle
3+
from six import integer_types
34

45
from joblib import Parallel, delayed
56
import numpy as np
@@ -310,9 +311,9 @@ def sample(draws=500, step=None, init='auto', n_init=200000, start=None,
310311
start = [start] * chains
311312
if random_seed == -1:
312313
random_seed = None
313-
if chains == 1 and isinstance(random_seed, (int, long)):
314+
if chains == 1 and isinstance(random_seed, integer_types):
314315
random_seed = [random_seed]
315-
if random_seed is None or isinstance(random_seed, (int, long)):
316+
if random_seed is None or isinstance(random_seed, integer_types):
316317
if random_seed is not None:
317318
np.random.seed(random_seed)
318319
random_seed = [np.random.randint(2 ** 30) for _ in range(chains)]

0 commit comments

Comments
 (0)