提交 22389ca2 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Typo & PEP8 fixes

上级 ad81d106
...@@ -13,7 +13,7 @@ if PY3: ...@@ -13,7 +13,7 @@ if PY3:
# In python 3.x, when an exception is reraised it saves original # In python 3.x, when an exception is reraised it saves original
# exception in its args, therefore in order to find the actual # exception in its args, therefore in order to find the actual
# message, we need to unpack arguments recurcively. # message, we need to unpack arguments recursively.
def exc_message(e): def exc_message(e):
msg = e.args[0] msg = e.args[0]
if isinstance(msg, Exception): if isinstance(msg, Exception):
...@@ -21,7 +21,7 @@ if PY3: ...@@ -21,7 +21,7 @@ if PY3:
return msg return msg
def cmp(a, b): def cmp(a, b):
"""Return -1 if x<y, 0 if x==y, 1 if x > y.""" """Return -1 if x < y, 0 if x == y, 1 if x > y."""
return (a > b) - (a < b) return (a > b) - (a < b)
all = all all = all
......
...@@ -615,7 +615,7 @@ def guess_n_streams(size, warn=True): ...@@ -615,7 +615,7 @@ def guess_n_streams(size, warn=True):
for s in size: for s in size:
r *= s r *= s
if r > 6: if r > 6:
r = r//6 # chosen as fastest for rbm_benchmark r = r // 6 # chosen as fastest for rbm_benchmark
# The purpose of sampling from many streams is to be able to use # The purpose of sampling from many streams is to be able to use
# the GPU to its full capacity. It just wastes RAM and stream-initialization time to # the GPU to its full capacity. It just wastes RAM and stream-initialization time to
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论