提交 a73b9210 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Add comment explaining the extra call.

上级 656055f6
......@@ -63,6 +63,10 @@ class GpuArrayType(Type):
ndmin=len(self.broadcastable))
else:
if not hasattr(data, 'dtype'):
# This is to convert objects that don't have a dtype
# (like lists). We anticipate that the type below
# will match and we pass copy=False so it won't make a
# second object on the GPU.
data = gpuarray.array(data, copy=False)
up_dtype = scalar.upcast(self.dtype, data.dtype)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论