Commit a487a44a authored by rusty1s's avatar rusty1s
Browse files

fixed print statements

parent 601b409a
......@@ -24,10 +24,6 @@ install:
- pip install flake8
- pip install codecov
script:
- which $CC
- which $CXX
- $CC --version
- $CXX --version
- pycodestyle .
- flake8 .
- python setup.py install
......
......@@ -66,8 +66,8 @@ def scatter_add(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
.. testoutput::
tensor([[ 0, 0, 4, 3, 3, 0],
[ 2, 4, 4, 0, 0, 0]])
tensor([[0, 0, 4, 3, 3, 0],
[2, 4, 4, 0, 0, 0]])
"""
src, out, index, dim = gen(src, index, dim, out, dim_size, fill_value)
return out.scatter_add_(dim, index, src)
......@@ -85,8 +85,8 @@ def scatter_div(src, index, dim=-1, out=None, dim_size=None, fill_value=1):
.. testoutput::
tensor([[ 1.0000, 1.0000, 0.2500, 0.5000, 0.5000, 1.0000],
[ 0.5000, 0.2500, 0.5000, 1.0000, 1.0000, 1.0000]])
tensor([[1.0000, 1.0000, 0.2500, 0.5000, 0.5000, 1.0000],
[0.5000, 0.2500, 0.5000, 1.0000, 1.0000, 1.0000]])
"""
src, out, index, dim = gen(src, index, dim, out, dim_size, fill_value)
return ScatterDiv.apply(out, src, index, dim)
......@@ -90,8 +90,8 @@ def scatter_max(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
.. testoutput::
tensor([[ 0, 0, 4, 3, 2, 0],
[ 2, 4, 3, 0, 0, 0]])
tensor([[0, 0, 4, 3, 2, 0],
[2, 4, 3, 0, 0, 0]])
tensor([[-1, -1, 3, 4, 0, 1],
[ 1, 4, 3, -1, -1, -1]])
"""
......
......@@ -62,8 +62,8 @@ def scatter_mean(src, index, dim=-1, out=None, dim_size=None, fill_value=0):
.. testoutput::
tensor([[ 0.0000, 0.0000, 4.0000, 3.0000, 1.5000, 0.0000],
[ 1.0000, 4.0000, 2.0000, 0.0000, 0.0000, 0.0000]])
tensor([[0.0000, 0.0000, 4.0000, 3.0000, 1.5000, 0.0000],
[1.0000, 4.0000, 2.0000, 0.0000, 0.0000, 0.0000]])
"""
out = scatter_add(src, index, dim, out, dim_size, fill_value)
count = scatter_add(torch.ones_like(src), index, dim, None, out.size(dim))
......
......@@ -84,8 +84,8 @@ def scatter_mul(src, index, dim=-1, out=None, dim_size=None, fill_value=1):
.. testoutput::
tensor([[ 1, 1, 4, 3, 6, 0],
[ 6, 4, 8, 1, 1, 1]])
tensor([[1, 1, 4, 3, 6, 0],
[6, 4, 8, 1, 1, 1]])
"""
src, out, index, dim = gen(src, index, dim, out, dim_size, fill_value)
return ScatterMul.apply(out, src, index, dim)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment