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 @@ -1060,7 +1060,7 @@ def mask_indices(
1060
1060
1061
1061
# pylint: disable=invalid-name
1062
1062
# pylint: disable=too-few-public-methods
1063
- class ndindex ( numpy . ndindex ) :
1063
+ class ndindex :
1064
1064
"""
1065
1065
An N-dimensional iterator object to index arrays.
1066
1066
@@ -1110,7 +1110,10 @@ class ndindex(numpy.ndindex):
1110
1110
"""
1111
1111
1112
1112
def __init__ (self , * shape ):
1113
- super ().__init__ (shape )
1113
+ self .ndindex_ = numpy .ndindex (* shape )
1114
+
1115
+ def __iter__ (self ):
1116
+ return self .ndindex_
1114
1117
1115
1118
def __next__ (self ):
1116
1119
"""
@@ -1123,8 +1126,7 @@ def __next__(self):
1123
1126
1124
1127
"""
1125
1128
1126
- # pylint: disable=useless-parent-delegation
1127
- return super ().__next__ ()
1129
+ return self .ndindex_ .__next__ ()
1128
1130
1129
1131
1130
1132
def nonzero (a ):
You can’t perform that action at this time.
0 commit comments