What is the main advantage of using NumPy arrays over Python lists?
Correct answer
C. NumPy arrays support vectorized operations
11 views
C. NumPy arrays support vectorized operations
11 views
NumPy arrays support vectorised operations. An expression such as a * 2 or a + b is applied to every element at once in compiled C code, with no Python loop.
Arrays are in fact fixed in size and hold a single data type — the opposite of the first two options — and that is the source of their speed.
Want more practice? Try the full set of Data Science MCQs on MCQsExam.com.
Not sure why the answer is C? Ask here and get an explanation.