QuizLander
← Tous les quiz publics

Python — NumPy: arrays & vectorized computation

par Jude · 23/05/2026 · 6 vues · 0 partages

Creating ndarrays, dtypes, shape, broadcasting, advanced indexing, aggregations, and performance. 20 questions.
20
Questions
🇬🇧 English
Langue
🟡 Moyen
Difficulté
Démarrer le quiz (invité ou compte)
Partager comme image

Aperçu des questions

  1. 1. What is the main difference between a Python list and a numpy.ndarray?
  2. 2. What is a.shape?
    import numpy as np
    a = np.array([[1, 2, 3], [4, 5, 6]])
    print(a.shape)
  3. 3. What does this print?
    a = np.arange(6).reshape(2, 3)
    print(a.sum(axis=0))
  4. 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. 5. Default dtype of np.array([1, 2, 3]) on a 64-bit OS?

… et 15 autres questions.

Commentaires

Connecte-toi pour commenter.

Chargement…