Question: Python code question. I have 3 image classes 0, 1, 2. 0 = bugs bunny, 1 = snow white and 2 = peter rabbit. I

Python code question. I have 3 image classes 0, 1, 2. 0 = bugs bunny, 1 = snow white and 2 = peter rabbit. I have a numpy array [2 0 1 ....... 2 2 1 0]. I want to select the first 5 peter rabbits to display the image. How do I index/slice to do so? My current code to print the first 5 "rows"/of the array (with no differencitation for the class) is (characters.image[:5])

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!