Перейти к содержимому

NumPy Level 6: Axis + Functions Practice | Min, Cumulative Sum, Sqrt & Trig

A.Kr.M.

0:00 / 0:00

NumPy Level 6: Axis + Functions Practice | Min, Cumulative Sum, Sqrt & Trig

0 просмотров · 3 дня назад
A.Kr.M.
0 просмотров · 3 дня назад
In this practice session, I continued my NumPy learning journey with **Level 6: Axis + Functions**. In this recording, I practiced: Column-wise vs row-wise minimum using `axis=0` and `axis=1` Cumulative sum using `np.cumsum()` Cumulative product using `np.cumprod()` Square root using `np.sqrt()` Trigonometric functions using `np.sin()` and `np.cos()` Mistakes & Corrections *Q25: Axis + Minimum* I initially predicted the `axis=0` and `axis=1` results incorrectly. I was thinking about the values in the first column/row rather than what the reduction operation produces. Correction: `axis=0` → reduces down the rows → gives a result for each *column* `axis=1` → reduces across the columns → gives a result for each *row* I also accidentally used `np.max()` first when the question asked for minimum, then corrected it to `np.min()`. *Q26: Cumulative Sum* I didn't remember the exact NumPy function name. I first tried `sum`, then checked the function and corrected it to `np.cumsum()`. I also practiced `np.cumprod()` for cumulative multiplication. *Q28: Trigonometric Functions* I couldn't remember the exact function name for cosine and checked it. Correction: NumPy uses `np.cos()` for cosine. The concept and final code were correct. These small mistakes are part of the learning process. The goal of this series is to *learn, practice, record, and upload* rather than pretend every solution is perfect. #NumPy #Python #PythonPractice #NumPyPractice #LearningPython #CodingPractice