提交 50ec34d6 authored 作者: Brandon T. Willard's avatar Brandon T. Willard

Apply isort to theano.misc sub-package modules

上级 6796db42
......@@ -8,7 +8,6 @@ import numpy as np
import theano
import theano.tensor as tt
from theano.gpuarray import dnn
from theano.tensor.nnet.abstract_conv import get_conv_output_shape
......
......@@ -10,13 +10,13 @@
import os
import sys
import time
from optparse import OptionParser
import numpy as np
import theano
import theano.tensor as tt
from optparse import OptionParser
def execute(execute=True, verbose=True, M=2000, N=2000, K=2000, iters=10, order="C"):
"""
......
import six.moves.cPickle as pickle
import os
import sys
import six.moves.cPickle as pickle
import theano
......
#!/bin/env python
# Import smtplib for the actual sending function
import smtplib
import os.path
import smtplib
import sys
from theano.misc.buildbot_filter import filter_output
# me == the sender's email address
# family = the list of all recipients' email addresses
family=['theano-buildbot@googlegroups.com']
......@@ -33,9 +36,11 @@ else:
files=[os.path.join('/tmp', x) for x in files]
print('path', files)
from email.mime.multipart import MIMEMultipart
# Here are the email package modules we'll need
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
COMMASPACE = ', '
......
import os
import subprocess
import sys
from optparse import OptionParser
from locale import getpreferredencoding
from optparse import OptionParser
import theano
from theano.compat import decode_with
console_encoding = getpreferredencoding()
parser = OptionParser(
......
import sys
import time
from optparse import OptionParser
import numpy as np
import theano
import theano.tensor as tt
from optparse import OptionParser
parser = OptionParser(
usage="%prog <options>\n Compute time for" " fast and slow elemwise operations"
......
......@@ -2,8 +2,8 @@
import collections
import operator
import functools
import operator
from theano.compat import Mapping
......
......@@ -6,10 +6,12 @@ try:
except NameError:
pass
import requests
import getpass
import json
import requests
# Keyring stores passwords by a 'username', but we're not storing a username and
# password
fake_username = "ipython_tools"
......
......@@ -7,10 +7,11 @@ import difflib
import operator
import os
import string
from subprocess import Popen, PIPE
import sys
import tabnanny
import tokenize
from subprocess import PIPE, Popen
try:
import argparse
......@@ -24,6 +25,7 @@ except ImportError:
import reindent
from six import StringIO
SKIP_WHITESPACE_CHECK_FILENAME = ".hg/skip_whitespace_check"
......
......@@ -42,10 +42,10 @@ you'd prefer. You can always use the --nobackup option to prevent this.
__version__ = "1"
import tokenize
import os
import shutil
import sys
import tokenize
verbose = 0
......
......@@ -4,6 +4,7 @@ import numpy as np
import theano
y = theano.tensor.fvector()
x = theano.shared(np.zeros(1, dtype="float32"))
f1 = theano.function([y], updates={x: y})
......
......@@ -5,10 +5,13 @@ numpy version support only ndarray.
import numpy as np
from theano.tensor.basic import TensorType
try:
import scipy.sparse
from theano.sparse.basic import SparseType
def _is_sparse(a):
......@@ -23,6 +26,7 @@ except ImportError:
from theano import gpuarray
if gpuarray.pygpu:
def _is_gpua(a):
......
import types
import weakref
from collections.abc import MutableSet
from six import string_types
......
......@@ -5,21 +5,22 @@ These pickled graphs can be used, for instance, as cases for
unit tests or regression tests.
"""
import numpy as np
import os
import pickle
import sys
import tempfile
import zipfile
import warnings
import theano
import zipfile
from collections import defaultdict
from contextlib import closing
from pickle import HIGHEST_PROTOCOL
import numpy as np
from six import BytesIO
import theano
try:
from pickle import DEFAULT_PROTOCOL
except ImportError:
......@@ -28,6 +29,7 @@ except ImportError:
from theano import config
from theano.compile.sharedvalue import SharedVariable
__docformat__ = "restructuredtext en"
__authors__ = "Pascal Lamblin"
__copyright__ = "Copyright 2013, Universite de Montreal"
......@@ -212,8 +214,8 @@ class PersistentNdarrayLoad(object):
self.cache = {}
def __call__(self, persid):
from theano.gpuarray.type import get_context
from theano.gpuarray import pygpu
from theano.gpuarray.type import get_context
array_type, name = persid.split(".")
......
......@@ -7,6 +7,7 @@ import numpy as np
import theano
__docformat__ = "restructuredtext en"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论