← All interview questions

Skill Zuno · skillzunos.com · Python Data Science

NumPy interview questions

Prepare for NumPy interviews on Skill Zuno. This practice book covers NumPy interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.

Open NumPy on Skill Zuno

Also see the NumPy tutorial.

NumPy is the foundational library for numerical computing in Python. Its n-dimensional array stores data in contiguous memory and runs operations in compiled code, making it far faster than Python lists, and pandas, scikit-learn and most of the scientific stack are built on it. Interviews cover arrays and dtypes, vectorisation, broadcasting, indexing, views versus copies, aggregation and linear algebra.

Sample NumPy interview questions

Why is NumPy faster than Python lists?

Arrays store elements of one type in contiguous memory, and operations run in optimised C loops without per-element Python overhead, often using SIMD instructions.

What are the broadcasting rules?

Shapes are compared from the right. Two dimensions are compatible if they are equal or one of them is 1, which is stretched to match. A shape (3, 1) array plus a (4,) array gives (3, 4).

Does slicing an array copy the data?

No. Basic slicing returns a view that shares memory, so modifying it changes the original. Boolean and fancy indexing return copies. Use .copy() when you need independence.

What does axis=0 mean in an aggregation?

Aggregate along the first axis, collapsing rows, so for a 2D array np.sum(a, axis=0) gives one sum per column.

What is the difference between * and @ for arrays?

* multiplies element by element. @, or np.matmul, performs matrix multiplication.

What you can practice

  • NumPy interview questions for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • Python Data Science topics alongside NumPy on skillzunos.com

More Python Data Science interview questions

All interview questions