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(
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
11301132def nonzero (a ):
You can’t perform that action at this time.
0 commit comments