提交 39eedf7d authored 作者: Matthew Koichi Grimes's avatar Matthew Koichi Grimes

fixed sparse.hstack, sparse.vstack to call scalar.upcast(*args), rather than scalar.upcast(args)

上级 ff27c77a
...@@ -2302,7 +2302,7 @@ def hstack(blocks, format=None, dtype=None): ...@@ -2302,7 +2302,7 @@ def hstack(blocks, format=None, dtype=None):
blocks = [as_sparse_variable(i) for i in blocks] blocks = [as_sparse_variable(i) for i in blocks]
if dtype is None: if dtype is None:
dtype = theano.scalar.upcast([i.dtype for i in blocks]) dtype = theano.scalar.upcast(*[i.dtype for i in blocks])
return HStack(format=format, dtype=dtype)(*blocks) return HStack(format=format, dtype=dtype)(*blocks)
...@@ -2378,7 +2378,7 @@ def vstack(blocks, format=None, dtype=None): ...@@ -2378,7 +2378,7 @@ def vstack(blocks, format=None, dtype=None):
blocks = [as_sparse_variable(i) for i in blocks] blocks = [as_sparse_variable(i) for i in blocks]
if dtype is None: if dtype is None:
dtype = theano.scalar.upcast([i.dtype for i in blocks]) dtype = theano.scalar.upcast(*[i.dtype for i in blocks])
return VStack(format=format, dtype=dtype)(*blocks) return VStack(format=format, dtype=dtype)(*blocks)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论