提交 9d5b63e5 authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Fixed typo in error message

To avoid confusion, 'array' usually refers to numeric (numpy) data, while 'tensor' often refers to symbolic (theano) objects.
上级 1e2b244d
...@@ -537,7 +537,7 @@ class TensorType(Type): ...@@ -537,7 +537,7 @@ class TensorType(Type):
# input (typical mistake, especially with shared variables). # input (typical mistake, especially with shared variables).
if isinstance(data, Variable): if isinstance(data, Variable):
raise TypeError( raise TypeError(
'Expected a tensor-like object, but found a Variable: ' 'Expected an array-like object, but found a Variable: '
'maybe you are trying to call a function on a (possibly ' 'maybe you are trying to call a function on a (possibly '
'shared) variable instead of a numeric array?') 'shared) variable instead of a numeric array?')
if (type(data) is numpy.ndarray) and (data.dtype is self.numpy_dtype): if (type(data) is numpy.ndarray) and (data.dtype is self.numpy_dtype):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论