Skip to content

Commit b19e705

Browse files
committed
Instantiate instance of numpy class
1 parent 0a67af9 commit b19e705

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
@@ -1060,7 +1060,7 @@ def mask_indices(
10601060

10611061
# pylint: disable=invalid-name
10621062
# pylint: disable=too-few-public-methods
1063-
class ndindex(numpy.ndindex):
1063+
class ndindex:
10641064
"""
10651065
An N-dimensional iterator object to index arrays.
10661066
@@ -1110,7 +1110,10 @@ class ndindex(numpy.ndindex):
11101110
"""
11111111

11121112
def __init__(self, *shape):
1113-
super().__init__(shape)
1113+
self.ndindex_ = numpy.ndindex(*shape)
1114+
1115+
def __iter__(self):
1116+
return self.ndindex_
11141117

11151118
def __next__(self):
11161119
"""
@@ -1123,8 +1126,7 @@ def __next__(self):
11231126
11241127
"""
11251128

1126-
# pylint: disable=useless-parent-delegation
1127-
return super().__next__()
1129+
return self.ndindex_.__next__()
11281130

11291131

11301132
def nonzero(a):

0 commit comments

Comments
 (0)