提交 1c73c350 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Stop hiding error messages with errors about constant copying.

上级 eb10bddb
......@@ -296,7 +296,11 @@ class GpuArrayConstant(_operators, Constant):
def __str__(self):
if self.name is not None:
return self.name
return "GpuArrayConstant{%s}" % numpy.asarray(self.data)
try:
np_data = numpy.asarray(self.data)
except gpuarray.GpuArrayException:
np_data = self.data
return "GpuArrayConstant{%s}" % np_data
GpuArrayType.Constant = GpuArrayConstant
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论