← Tous les quiz publics
Démarrer le quiz (invité ou compte)
Python — NumPy: arrays & vectorized computation
par Jude · 23/05/2026 · 6 vues · partages
Creating ndarrays, dtypes, shape, broadcasting, advanced indexing, aggregations, and performance. 20 questions.
20
Questions
🇬🇧 English
Langue
🟡 Moyen
Difficulté
Aperçu des questions
-
1. What is the main difference between a Python
listand anumpy.ndarray? -
2. What is
a.shape?import numpy as np a = np.array([[1, 2, 3], [4, 5, 6]]) print(a.shape) -
3. What does this print?
a = np.arange(6).reshape(2, 3) print(a.sum(axis=0)) -
4. What is the broadcast output shape?
a = np.array([[1], [2], [3]]) # shape (3, 1) b = np.array([10, 20, 30]) # shape (3,) print((a + b).shape) -
5. Default dtype of
np.array([1, 2, 3])on a 64-bit OS?
… et 15 autres questions.