Unverified 提交 0eb62a97 authored 作者: abergeron's avatar abergeron 提交者: GitHub

Merge pull request #6547 from nouiz/fix_crash_during_error

See gh-6543. Sometimes, np.asarray(self.data) fail with a read error …
......@@ -603,7 +603,10 @@ class GpuArrayConstant(_operators, Constant):
try:
np_data = np.asarray(self.data)
except gpuarray.GpuArrayException:
np_data = self.data
try:
np_data = str(self.data)
except Exception:
np_data = 'Unknown'
return "GpuArrayConstant{%s}" % np_data
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论