Skip to content

Commit a22274b

Browse files
committed
Instantiate instance of numpy class
1 parent 78a609b commit a22274b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dpnp/dpnp_iface_indexing.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ def mask_indices(
10621062

10631063
# pylint: disable=invalid-name
10641064
# pylint: disable=too-few-public-methods
1065-
class ndindex(numpy.ndindex):
1065+
class ndindex:
10661066
"""
10671067
An N-dimensional iterator object to index arrays.
10681068
@@ -1112,7 +1112,10 @@ class ndindex(numpy.ndindex):
11121112
"""
11131113

11141114
def __init__(self, *shape):
1115-
super().__init__(shape)
1115+
self.ndindex_ = numpy.ndindex(*shape)
1116+
1117+
def __iter__(self):
1118+
return self.ndindex_
11161119

11171120
def __next__(self):
11181121
"""
@@ -1125,8 +1128,7 @@ def __next__(self):
11251128
11261129
"""
11271130

1128-
# pylint: disable=useless-parent-delegation
1129-
return super().__next__()
1131+
return self.ndindex_.__next__()
11301132

11311133

11321134
def nonzero(a):

0 commit comments

Comments
 (0)