提交 42e3d643 authored 作者: Frederic Bastien's avatar Frederic Bastien

rearange import following our convention

上级 018543c8
from theano.sparse import * import time
import unittest
from nose.plugins.skip import SkipTest from nose.plugins.skip import SkipTest
if enable_sparse == False: import numpy
raise SkipTest('Optional package sparse disabled') import scipy.sparse as sp
import scipy.sparse import scipy.sparse
import random, time
import unittest
import theano import theano
from theano import compile from theano import compile
from theano import gradient
from theano import gof
from theano.sparse.basic import _is_dense, _is_sparse, _is_dense_variable, _is_sparse_variable from theano.sparse.basic import _is_dense, _is_sparse, _is_dense_variable, _is_sparse_variable
from theano.sparse.basic import _mtypes, _mtype_to_str from theano.sparse.basic import _mtypes
from theano.sparse import as_sparse_variable, enable_sparse, CSC, CSR, CSM, CSMProperties, SparseType, StructuredDotCSC
from theano.sparse import add, structured_dot, transpose
from theano.sparse import csc_from_dense, csr_from_dense, dense_from_sparse
from theano.tests import unittest_tools as utt from theano.tests import unittest_tools as utt
from theano import tensor
if enable_sparse == False:
raise SkipTest('Optional package sparse disabled')
def eval_outputs(outputs): def eval_outputs(outputs):
return compile.function([], outputs)()[0] return compile.function([], outputs)()[0]
...@@ -172,7 +174,6 @@ class T_conversion(unittest.TestCase): ...@@ -172,7 +174,6 @@ class T_conversion(unittest.TestCase):
self.failUnless(str(val.dtype)==s.dtype) self.failUnless(str(val.dtype)==s.dtype)
self.failUnless(numpy.all(val[0] == [1,0,0,0,0])) self.failUnless(numpy.all(val[0] == [1,0,0,0,0]))
import scipy.sparse as sp
class test_structureddot(unittest.TestCase): class test_structureddot(unittest.TestCase):
def setUp(self): def setUp(self):
utt.seed_rng() utt.seed_rng()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论