Skip to content

Commit f20e09c

Browse files
committed
Add operation __index__ and __complex__
1 parent 744a3f2 commit f20e09c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dpnp/dpnp_array.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ def __bool__(self):
140140
return self._array_obj.__bool__()
141141

142142
# '__class__',
143-
# '__complex__',
143+
144+
def __complex__(self):
145+
return self._array_obj.__complex__()
146+
144147
# '__contains__',
145148
# '__copy__',
146149
# '__deepcopy__',
@@ -187,7 +190,10 @@ def __gt__(self, other):
187190
# '__imatmul__',
188191
# '__imod__',
189192
# '__imul__',
190-
# '__index__',
193+
194+
def __index__(self):
195+
return self._array_obj.__index__()
196+
191197
# '__init__',
192198
# '__init_subclass__',
193199

0 commit comments

Comments
 (0)