11 January 2026

#NumPy

#NumPy

Key Concepts


S.No Topic Sub-Topics
1IntroductionOverview, Installation, NumPy array, Differences with list, np.array()
2Array Basics1D array, 2D array, 3D array, ndim, shape
3Array Creationarange, zeros, ones, linspace, eye
4Data Typesdtype, astype, type promotion, itemsize, kind
5Indexing & SlicingIndexing, Slicing, Negative indexing, Steps, Multi-dimensional indexing
6Fancy IndexingInteger indexing, Boolean indexing, mask arrays, where(), nonzero()
7Array OperationsArithmetic ops, Universal functions (ufunc), Broadcasting, Aggregation, Comparisons
8Advanced Operationssum, mean, std, min, max, argmin, argmax
9Reshaping Arraysreshape, flatten, ravel, transpose, swapaxes
10Stacking & Splittingvstack, hstack, concatenate, split, vsplit, hsplit
11Broadcasting AdvancedRules, Shape compatibility, Example, Broadcasting in ufunc, Arithmetic operations
12Copy vs ViewShallow copy, Deep copy, view(), copy(), memory layout
13Random Modulerand, randint, randn, seed, shuffle
14Mathematical Functionssqrt, exp, log, sin, cos, tan
15Linear Algebra Basicsdot, matmul, transpose, inv, det, eigh
16Statistical Functionsmean, median, var, std, percentile, correlation
17Sorting & Searchingsort, argsort, argmax, argmin, searchsorted
18Polynomialspoly1d, roots, polyval, fit, coefficients
19Set Operationsunique, intersect1d, union1d, setdiff1d, in1d
20String Operationschar module, vectorized string ops, split, join, replace
21Masked Arraysma.masked_array, masking condition, compress, filled, mask
22Structured Arraysdtype definition, field access, record array, indexing, slicing
23Time Seriesdatetime64, timedelta64, date arithmetic, frequency conversion, indexing
24Fourier Transformfft, ifft, rfft, irfft, frequency analysis
25Memory LayoutC order, F order, strides, contiguous array, copy flags
26VectorizationLoop elimination, ufuncs, broadcasting, efficient computation, np.einsum
27Advanced Indexingfancy indexing, boolean masks, ix_, combine indexing, multi-dimensional selection
28Integration with PandasConvert to DataFrame, from DataFrame, NumPy arrays in pandas, indexing, calculations
29Performance TipsVectorization, memory layout, dtype optimization, broadcasting, avoiding loops
30End-to-End ProjectData loading, cleaning, analysis, linear algebra, visualization

Interview question

Basic Level

  1. What is NumPy?
  2. Why is NumPy faster than Python lists?
  3. What is an ndarray?
  4. How do you create a NumPy array?
  5. Difference between array and list?
  6. What are NumPy data types?
  7. What is the shape of an array?
  8. What is dtype in NumPy?
  9. How do you check array dimensions?
  10. What is axis in NumPy?
  11. How to create arrays of zeros and ones?
  12. What is arange()?
  13. Difference between arange() and linspace()?
  14. How do you reshape an array?
  15. What is flatten()?
  16. Difference between ravel() and flatten()?
  17. How do you copy arrays?
  18. What is broadcasting?
  19. What are universal functions (ufuncs)?
  20. How to find min, max, mean?
  21. How do you sort an array?
  22. How to index NumPy arrays?
  23. What is slicing?
  24. How do you convert list to array?
  25. How do you check NumPy version?

Intermediate Level

  1. What is vectorization?
  2. Explain NumPy broadcasting rules.
  3. Difference between view and copy?
  4. How do you stack arrays?
  5. Difference between vstack and hstack?
  6. What is np.concatenate()?
  7. How do you split arrays?
  8. Explain boolean indexing.
  9. What is fancy indexing?
  10. How do you handle missing values?
  11. What is np.where()?
  12. How to compute cumulative sum?
  13. What is np.unique()?
  14. How do you remove duplicates?
  15. Difference between dot() and matmul()?
  16. What is transpose?
  17. How to invert a matrix?
  18. What is identity matrix?
  19. Explain numpy.random module.
  20. Difference between randint and rand?
  21. How to generate normal distribution?
  22. How to save NumPy arrays?
  23. Difference between .npy and .npz?
  24. How to load data from CSV?
  25. How do you compare arrays?

Advanced Level

  1. What is memory layout (C vs Fortran order)?
  2. Explain strides in NumPy.
  3. What is np.einsum()?
  4. How does NumPy handle memory?
  5. Difference between shallow and deep copy?
  6. What is masked array?
  7. How to optimize NumPy performance?
  8. Explain structured arrays.
  9. What is recarray?
  10. How does NumPy handle large datasets?
  11. Explain vectorized operations internally.
  12. Difference between float32 and float64?
  13. How to use NumPy with C/C++?
  14. What is np.memmap()?
  15. How to align arrays for broadcasting?
  16. What is NumPy FFT?
  17. How does NumPy handle overflow?
  18. What is np.clip()?
  19. How to compute eigenvalues?
  20. Difference between covariance and correlation?
  21. What is SVD in NumPy?
  22. How to debug NumPy performance issues?
  23. What is np.take()?
  24. How to use np.apply_along_axis()?
  25. Explain NumPy polynomial module.

Expert Level

  1. How does NumPy achieve high performance?
  2. Explain BLAS and LAPACK usage in NumPy.
  3. What is cache friendliness in NumPy?
  4. Explain SIMD in NumPy.
  5. How does NumPy handle multithreading?
  6. Difference between NumPy and CuPy?
  7. How to profile NumPy code?
  8. What is NumPy ABI compatibility?
  9. Explain NumPy C-API.
  10. How to write custom ufuncs?
  11. What are gufuncs?
  12. How does NumPy interact with pandas?
  13. Explain numerical stability issues.
  14. How does NumPy handle precision loss?
  15. What is memory alignment?
  16. How to manage NumPy in distributed systems?
  17. Difference between NumPy and JAX?
  18. How does NumPy compare with PyTorch tensors?
  19. How to scale NumPy for big data?
  20. Explain NumPy?s future roadmap.
  21. How to debug segmentation faults in NumPy?
  22. What is NumPy typing (PEP 484)?
  23. How to handle sparse data in NumPy?
  24. Explain NumPy universal function loops.
  25. How do you extend NumPy?

Related Topics