Data Tools · Module 1Module material
NumPy interview questions
22 questions interviewers ask on this module’s topics, from first principles to the follow-ups. Each comes with a model answer.
- What distinguishes a numeric NumPy array from a Python list?
- Is NumPy always faster?
- What do
shape,ndimandsizereport? - What does
dtypecontrol? - What must be true before reshape?
- Does reshape always avoid a copy?
- How do basic slicing and fancy indexing differ?
- What does a boolean mask do?
- Why does
andfail between two array comparisons? - What is broadcasting?
- Can broadcasting produce a valid but wrong result?
- What does
axis=0mean for the revenue grid? - Why use
keepdims=True? - What does
argmaxreturn? - How does
nanaffectmean? - How do
*and@differ? - What does
.Tdo to a one-dimensional array? - Why solve a linear system instead of explicitly inverting?
- What if feature columns are linearly dependent?
- What does a seed guarantee?
- Why is one permutation used for features and labels?
- How do you compare floating-point arrays?