CHAPTER 06
Beginner
NumPy Mathematical Functions
Updated: May 18, 2026
5 min read
# CHAPTER 6
NumPy Mathematical Functions
1. Chapter Introduction
NumPy provides over 60 universal functions (ufuncs) that operate element-wise on arrays at C-speed. From basic arithmetic to advanced linear algebra, these functions are the computational engine behind scientific Python.2. Universal Functions (ufuncs)
python
3. Trigonometric Functions
python
4. Logarithm and Exponential
python
5. Linear Algebra
python
6. Aggregation Functions
python
7. Common Mistakes
-
Degrees vs radians:
np.sin(90)does NOT give 1.0 — it computes sin(90 radians). Always convert withnp.radians(90)first.
-
log(0)is undefined: Returns-infwith a warning. Check for zeros before applying log.
8. MCQs
Question 1
np.radians(90) converts?
Question 2
np.sqrt(arr) applies?
Question 3
np.linalg.solve(A, b) solves?
Question 4
np.percentile(arr, 75) returns?
Question 5
np.log(x) computes?
Question 6
np.linalg.norm(v) for [3,4] returns?
Question 7
np.floor(3.7) returns?
Question 8
ufunc stands for?
Question 9
np.ptp(arr) computes?
Question 10
np.linalg.eig(A) returns?
9. Interview Questions
- Q: What are NumPy universal functions (ufuncs)?
- Q: How do you solve a system of linear equations with NumPy?