提交 5da99b9e authored 作者: Frederic Bastien's avatar Frederic Bastien

small fix and code style following code review.

上级 f9cbc7c1
......@@ -433,9 +433,8 @@ complexs128 = _multi(complex128)
def upcast_out(*types):
return Scalar(dtype = Scalar.upcast(*types)),
def upcast_out_no_complex(*types):
if any([type not in float_types for type in types]):
raise TypeError('complex type are supported')
if any([type in complex_types for type in types]):
raise TypeError('complex type are notsupported')
return Scalar(dtype = Scalar.upcast(*types)),
def same_out(type):
return type,
......
#definition theano.scalar op that have their python implementation taked from scipy
#as scipy is not always available, we put threat them separatly
from theano.scalar.basic import UnaryScalarOp,exp,upgrade_to_float,upgrade_to_float_no_complex,complex_types,float_types,upcast
import numpy
from theano.scalar.basic import UnaryScalarOp,exp,upgrade_to_float,float_types
from theano.scalar.basic import upgrade_to_float_no_complex,complex_types,upcast
imported_scipy_special = False
try:
import scipy.special
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论