Which of the following Python libraries is primarily used to define and…
2026
Which of the following Python libraries is primarily used to define and manipulate the ndarray object?
- A.
numpy
- B.
pandas
- C.
plotly
- D.
matplotlib
Attempted by 559 students.
Show answer & explanation
Correct answer: A
The correct answer is Option A (numpy).
The NumPy library is primarily used to define and manipulate ndarray (N-dimensional array) objects in Python. It provides efficient storage, fast operations, and mathematical functions for handling large numerical datasets.
Other libraries like pandas, matplotlib, and plotly are built on top of NumPy or use it internally, but ndarray is specifically a core feature of NumPy.