iterating over multidimensional numpy array and skipping rows

You are declaring checklist variable inside the for loop. That’s why in each iteration of for loop, checklist variable is being reset to [ ]. Hence it is keeping data only of the last iteration of for loop i.e. last row of arr1.

You should declare checklist above the for loop.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top