Loading...
Access elements from a NumPy array using basic indexing.
NumPy supports powerful indexing:
Write a function get_elements(arr) that returns a dictionary with:
Return a dictionary with exactly these three keys.
[10, 20, 30, 40, 50]
{'first': 10, 'last': 50, 'middle': 30}Index 0 for first, -1 for last, len//2 for middle