Skip to content

Commit 48348c9

Browse files
Review remarks
1 parent 63dcc33 commit 48348c9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dpnp/dpnp_iface_mathematical.py

+5-3
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)