FunctionRacerProblemsRace

Pick Items

BeginnerNumPyPython

Return a list of the items of arr found at the indexes listed in positions, in the order of positions. An index may be listed more than once. Hint: NumPy lets you index an array with another array.

Example 1

arr [10,20,30,40]
positions [3,0,3]
returns [40,10,40]

Index 3 is 40, index 0 is 10, and 40 again.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems