← Quiz: NumPy: all 10 questions
Quiz: NumPy · Question 9 of 10
Why does a NumPy array require all elements to share one dtype?
Why does a NumPy array require all elements to share one dtype?
- A.To allow mixing text and numbers freely
- B.It is only a naming convention
- C.So arrays can grow like lists
- D.Fixed-type, compact storage lets operations run in fast compiled code
Answer & explanation
Correct answer: Fixed-type, compact storage lets operations run in fast compiled code
This is the main reason arrays beat lists for maths.
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 →