Skip to content

Commit ed76eae

Browse files
author
Vahid Tavanashad
committed
address comments
1 parent 1a1c17c commit ed76eae

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

dpnp/dpnp_array.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,14 +1098,8 @@ def item(self, *args):
10981098
10991099
"""
11001100

1101-
if args is None:
1102-
if self.size != 1:
1103-
raise ValueError(
1104-
"can only convert an array of size 1 to a Python scalar"
1105-
)
1106-
else:
1107-
args = 0
1108-
1101+
# TODO: implement a more efficient way to avoid copying to host
1102+
# for large arrays using `asnumpy()`
11091103
return self.asnumpy().item(*args)
11101104

11111105
# 'itemset',

0 commit comments

Comments
 (0)