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

Fix crash. The dtype is passed to numpy.array() and it understand only dtype, not typecode.

上级 b9cbe844
......@@ -48,7 +48,7 @@ class GpuArrayType(Type):
else:
up_dtype = scalar.upcast(self.dtype, data.dtype)
if up_dtype == self.dtype:
data = gpuarray.array(data, dtype=self.typecode, copy=False)
data = gpuarray.array(data, dtype=self.dtype, copy=False)
else:
raise TypeError("%s cannot store a value of dtype %s "
"without risking loss of precision." %
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论