Unverified 提交 8f510a1f authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #6718 from timodonnell/patch-1

use string_types instead of str in get_substream_rstates dtype assertion
...@@ -16,7 +16,7 @@ from __future__ import absolute_import, print_function, division ...@@ -16,7 +16,7 @@ from __future__ import absolute_import, print_function, division
import warnings import warnings
import numpy as np import numpy as np
from six import integer_types from six import integer_types, string_types
from six.moves import xrange from six.moves import xrange
import theano import theano
...@@ -768,7 +768,7 @@ class MRG_RandomStreams(object): ...@@ -768,7 +768,7 @@ class MRG_RandomStreams(object):
and they are spaced by 2**72 samples. and they are spaced by 2**72 samples.
""" """
assert isinstance(dtype, str) assert isinstance(dtype, string_types)
assert n_streams < 2**72 assert n_streams < 2**72
assert n_streams > 0 assert n_streams > 0
rval = np.zeros((n_streams, 6), dtype='int32') rval = np.zeros((n_streams, 6), dtype='int32')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论