15 Numpy Functionalities That Every Data Scientist Must Know


Original Source Here

14. Minimum, Maximum, And Absolute:

a = np.array([1, 2, -3, 4, 5])

Output: -3
[1 2 3 4 5]

Looking at some other basic operations that we can perform with numpy arrays are to find out the minimum, maximum, and absolute values of a particular numpy array. The np.min() and np.max() functions are quite self-explanatory as these operations are used to compute the minimum and maximum values in the given numpy array, respectively.

While the other two functions return a single value, which is either a single minimum or maximum value, the absolute function will return back an array. However, all the base values are returned without the consideration of the negative sign. The other similar functions which I would recommend the users to experiment with are operations on the ceiling, flooring, and other such operations.

15. Trigonometric functions:


Output: 0.8660254037844386

Apart from all the exceptional tasks that you achieve with numpy arrays, you can also perform trigonometric operations with this library. In the above example, we have performed a couple of simple trigonometric operations on sine and cosine for sixty degrees to achieve their respective results. Feel free to explore other similar trigonometric functions.


Trending AI/ML Article Identified & Digested via Granola by Ramsey Elbasheer; a Machine-Driven RSS Bot

%d bloggers like this: