提交 36dc2788 authored 作者: George Ho's avatar George Ho

flake8 fixes

上级 24f0bdb0
import os
from pickle import Unpickler
import numpy as np
import pytest
......@@ -372,8 +371,3 @@ def test_gpu_opt_wor():
pval = pval / pval.sum(axis=1)[:, None]
uval = np.ones_like(pval[:, 0]) * 0.5
f(pval, uval, 1)
def test_unpickle_legacy_op():
testfile_dir = os.path.dirname(os.path.realpath(__file__))
fname = "test_gpuarray_multinomial_wo_replacement.pkl"
......@@ -1941,7 +1941,7 @@ class Compiler:
if not compiler:
return False
code = b(
code = (
"""
%(preambule)s
int main(int argc, char** argv)
......@@ -1951,7 +1951,7 @@ class Compiler:
}
"""
% locals()
)
).encode()
return cls._try_compile_tmp(
code,
tmp_prefix="try_flags_",
......
import hashlib
import linecache
import sys
import traceback
from io import StringIO
import numpy as np
from theano import config
......@@ -597,9 +596,6 @@ def remove(predicate, coll):
return [x for x in coll if not predicate(x)]
import hashlib
def hash_from_code(msg):
# hashlib.sha256() requires an object that supports buffer interface,
# but Python 3 (unicode) strings don't.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论