All NumPy quizzes
Intermediate30 questions60 minutes

NumPy Intermediate Quiz

Explore broadcasting, advanced indexing, linear algebra, statistics, and array manipulation

Start the quiz

Sample questions from this quiz

A preview of the style and depth. Try each one, then reveal the answer — or skip straight to the timed quiz.

1. What is fancy indexing?

  • Array indexing
  • Indexing with arrays of indices
  • Advanced indexing
  • Complex selection
Show answer

Answer: Indexing with arrays of indices. Fancy indexing uses arrays of indices to access elements: arr[[0, 2, 4]]. Always returns copy, not view. Can use multiple arrays for multi-dimensional indexing.

2. What is boolean indexing?

  • Conditional selection
  • True/False indexing
  • Indexing with boolean arrays
  • Boolean mask
Show answer

Answer: Indexing with boolean arrays. Boolean indexing uses boolean arrays: arr[arr > 5]. Creates mask of True/False. Returns elements where mask is True. Powerful for filtering.

3. What does np.where() do?

  • Position finder
  • Conditional finder
  • Returns indices where condition is True
  • Index locator
Show answer

Answer: Returns indices where condition is True. np.where(condition) returns indices where True. np.where(condition, x, y) returns elements from x where True, y where False. Ternary operation.

Frequently asked questions

How many questions are in this NumPy quiz?+

30 questions, with a 60-minute time limit. Every question includes a written explanation of the correct answer.

Is this NumPy quiz free?+

Yes. Every quiz on CodexQuizz is free and needs no account. You only enter a name if you choose to post your score to the leaderboard.

What level is the intermediate quiz aimed at?+

Explore broadcasting, advanced indexing, linear algebra, statistics, and array manipulation

Can I use this to prepare for a NumPy interview?+

Yes. The questions cover the topics that come up in NumPy technical screens, and the explanations are written so that a wrong answer still teaches you the underlying concept.

Ready to test your NumPy?

30 questions, 60 minutes. Free, no sign-up.

Start now