File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1062,7 +1062,7 @@ def mask_indices(
1062
1062
1063
1063
# pylint: disable=invalid-name
1064
1064
# pylint: disable=too-few-public-methods
1065
- class ndindex ( numpy . ndindex ) :
1065
+ class ndindex :
1066
1066
"""
1067
1067
An N-dimensional iterator object to index arrays.
1068
1068
@@ -1112,7 +1112,10 @@ class ndindex(numpy.ndindex):
1112
1112
"""
1113
1113
1114
1114
def __init__ (self , * shape ):
1115
- super ().__init__ (shape )
1115
+ self .ndindex_ = numpy .ndindex (* shape )
1116
+
1117
+ def __iter__ (self ):
1118
+ return self .ndindex_
1116
1119
1117
1120
def __next__ (self ):
1118
1121
"""
@@ -1125,8 +1128,7 @@ def __next__(self):
1125
1128
1126
1129
"""
1127
1130
1128
- # pylint: disable=useless-parent-delegation
1129
- return super ().__next__ ()
1131
+ return self .ndindex_ .__next__ ()
1130
1132
1131
1133
1132
1134
def nonzero (a ):
You can’t perform that action at this time.
0 commit comments