Skip to content

Commit 9ede6a5

Browse files
Review remarks
1 parent dc877db commit 9ede6a5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dpnp/dpnp_iface_mathematical.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,9 +1859,11 @@ def sum(
18591859
result = dpnp_array._create_from_usm_ndarray(output)
18601860

18611861
if keepdims:
1862-
result = result.reshape((1,) + output.shape)
1863-
if axis == (1,):
1864-
result = result.T
1862+
if axis == (0,):
1863+
res_sh = (1,) + output.shape
1864+
else:
1865+
res_sh = output.shape + (1,)
1866+
result = result.reshape(res_sh)
18651867

18661868
return result
18671869

0 commit comments

Comments
 (0)