Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 8 subjective questions NumPy functions

ECAP776 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define NumPy universal functions. Explain their main features with suitable examples.

  2. Question 2 of 20

    Explain the arithmetic functions provided by NumPy. How do they differ from ordinary Python arithmetic on lists?

  3. Question 3 of 20

    Describe NumPy trigonometric functions and explain how angles can be converted between degrees and radians.

  4. Question 4 of 20

    Explain exponential, logarithmic, square-root, and absolute-value functions in NumPy with examples.

  5. Question 5 of 20

    Compare np.floor(), np.ceil(), np.trunc(), and np.round().

  6. Question 6 of 20

    Explain the use of np.sum(), np.prod(), np.cumsum(), and np.cumprod(). Illustrate how the axis parameter affects their results.

  7. Question 7 of 20

    Define mean, median, and weighted average. Explain how NumPy calculates them.

  8. Question 8 of 20

    Derive the formulas for variance and standard deviation, and explain how ddof affects NumPy calculations.

  9. Question 9 of 20

    Explain minimum, maximum, range, peak-to-peak, and the functions used to locate extreme values in a NumPy array.

  10. Question 10 of 20

    Describe percentiles and quantiles. Explain how they are computed in NumPy and state their relationship.

  11. Question 11 of 20

    How are missing values handled by NumPy statistical functions? Compare regular functions with their nan variants.

  12. Question 12 of 20

    Explain np.sort() and discuss sorting by axis in one-dimensional and two-dimensional arrays.

  13. Question 13 of 20

    Distinguish between np.sort() and np.argsort(). How can np.argsort() be used to reorder related data?

  14. Question 14 of 20

    Explain stable sorting and the kind parameter of NumPy sorting functions. Why can sorting stability be important?

  15. Question 15 of 20

    Describe np.lexsort() and explain how it performs indirect sorting using multiple keys.

  16. Question 16 of 20

    Explain the different forms of np.where(). Show how it can be used both for locating and conditionally replacing values.

  17. Question 17 of 20

    Compare np.nonzero(), np.argwhere(), and np.flatnonzero().

  18. Question 18 of 20

    Describe np.searchsorted(). Explain the meaning of side="left" and side="right", and state its main precondition.

  19. Question 19 of 20

    Explain np.count_nonzero() and show how its result changes when an axis or condition is supplied.

  20. Question 20 of 20

    Compare np.unique(), np.bincount(), and np.histogram() as counting functions. State when each should be used.

That's unit 8

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.