Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 84)
84.
Given a NumPy array arr = np.array([[1, 2, 3], [4, 5, 6]]), how can you extract the second column?
arr[:, 1]
arr[1, :]
arr[1, 1]
arr[:, 2]
Answer: Option
Explanation:
The colon : denotes all rows, and 1 specifies the second column.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.