提交 6c696462 authored 作者: Ian Goodfellow's avatar Ian Goodfellow

added parameter names to make a call more readable

上级 45bd626b
...@@ -255,11 +255,13 @@ def sp_zeros_like(x): ...@@ -255,11 +255,13 @@ def sp_zeros_like(x):
:return: The same as `x` with zero entries :return: The same as `x` with zero entries
for all element. for all element.
""" """
# TODO: don't restrict to CSM formats # TODO: don't restrict to CSM formats
_, _, indptr, shape = csm_properties(x) _, _, indptr, shape = csm_properties(x)
return CSM(format=x.format)(numpy.array([], dtype=x.type.dtype), return CSM(format=x.format)(data=numpy.array([], dtype=x.type.dtype),
numpy.array([]), tensor.zeros_like(indptr), indices=numpy.array([]),
shape) indptr=tensor.zeros_like(indptr),
shape=shape)
class _sparse_py_operators: class _sparse_py_operators:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论