提交 f2b92542 authored 作者: Dumitru Erhan's avatar Dumitru Erhan

merge

import sys import sys
import numpy, scipy import numpy
import scipy.sparse import scipy.sparse
from theano import gof from theano import gof
......
import sys,scipy
from basic import * enable_sparse=True
if not scipy.__version__.startswith('0.7.'):
sys.stderr.write("WARNING: scipy version = %s. We request version >=0.7.0 for the sparse code as it has bugs fixed in the sparse matrix code.\n" % scipy.__version__)
enable_sparse=False
if enable_sparse:
from basic import *
...@@ -29,10 +29,6 @@ _mtypes = [sparse.csc_matrix, sparse.csr_matrix] ...@@ -29,10 +29,6 @@ _mtypes = [sparse.csc_matrix, sparse.csr_matrix]
#* new class ``bsr_matrix`` : the Block CSR format #* new class ``bsr_matrix`` : the Block CSR format
_mtype_to_str = {sparse.csc_matrix: "csc", sparse.csr_matrix: "csr"} _mtype_to_str = {sparse.csc_matrix: "csc", sparse.csr_matrix: "csr"}
import scipy
if not scipy.__version__.startswith('0.7.'):
sys.stderr.write("WARNING: scipy version = %s. We prefer version >=0.7.0 because it has bugs fixed in the sparse matrix code.\n" % scipy.__version__)
def _is_sparse_variable(x): def _is_sparse_variable(x):
""" """
@rtype: boolean @rtype: boolean
......
import scipy.sparse import scipy.sparse
from theano.sparse import * from theano.sparse import *
from nose.plugins.skip import SkipTest
if enable_sparse == False:
raise SkipTest('Optional package sparse disabled')
import random import random
import unittest import unittest
import theano import theano
......
import unittest import unittest
import numpy import numpy
import theano.tensor as T import theano.tensor as T
from ..configparser import config, AddConfigVar, IntParam from theano.configparser import config, AddConfigVar, IntParam
import os, sys import os, sys
AddConfigVar('unittests.rseed', AddConfigVar('unittests.rseed',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论