Python Programming - Arrays - Discussion

Discussion Forum : Arrays - General Questions (Q.No. 10)
10.
How do you create a 2D NumPy array?
np.array([[1, 2, 3], [4, 5, 6]])
numpy.create_2d_array([[1, 2, 3], [4, 5, 6]])
array.create([[1, 2, 3], [4, 5, 6]])
np.array([1, 2, 3], [4, 5, 6])
Answer: Option
Explanation:
The correct syntax to create a 2D NumPy array is np.array([[1, 2, 3], [4, 5, 6]]).
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.