Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 73)
73.
Given a NumPy array arr = np.array([[1, 2, 3], [4, 5, 6]]), how can you access the element 5?
arr[1, 2]
arr[1, 1]
arr[0, 2]
arr[1, 0]
Answer: Option
Explanation:
The indexing starts from 0, so arr[1, 2] refers to the element in the second row and second column.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.