← Quiz: NumPy: all 10 questions
Quiz: NumPy · Question 4 of 10
Why are NumPy arrays faster than Python lists for maths?
Why are NumPy arrays faster than Python lists for maths?
- A.They use more memory
- B.They store one data type compactly and run operations in optimised C code
- C.They are always sorted
- D.They run on the GPU automatically
Answer & explanation
Correct answer: They store one data type compactly and run operations in optimised C code
Vectorised operations avoid the Python loop overhead.
Can you get the rest right without peeking?
Take the timed Quiz: NumPy quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →