提交 b41e3605 authored 作者: Frederic's avatar Frederic

Move TensorType to its own file as CudaNdarrayType and SparseType.

This advance ticket gh-651
上级 0a1468ed
...@@ -78,4 +78,4 @@ from theano.gof.type import \ ...@@ -78,4 +78,4 @@ from theano.gof.type import \
Type, Generic, generic Type, Generic, generic
from theano.gof.utils import \ from theano.gof.utils import \
object2, MethodNotDefined hashtype, object2, MethodNotDefined
...@@ -22,6 +22,11 @@ def hashgen(): ...@@ -22,6 +22,11 @@ def hashgen():
hashgen.next = 0 hashgen.next = 0
def hashtype(self):
t = type(self)
return hash(t.__name__) ^ hash(t.__module__)
class MethodNotDefined(Exception): class MethodNotDefined(Exception):
""" """
To be raised by functions defined as part of an interface. To be raised by functions defined as part of an interface.
......
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论