My First Step Towards World Of Digital Marketing thru Digital Deepak

It has been almost 3 years, I am following Digital Deepak Sir, I always wanted to learn digital marketing for that I have enrolled in a few courses offered by Digital Deepak but never got motivated…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Master NumPy

A lot of you must be preaching for machine learning, AI and Computer Vision etc and you stumbled across NumPy. Others just want to learn this for computation.

NumPy stands for Numerical Python is a library for python, which is used to tackle large arrays and multi-dimensional matrices. It also provides many high-level mathematical functions to start with basic trigonometric functions to very complicated Fourier transform.

It is almost to impossible to create multi-dimensional arrays using list in python. Additionally NumPy is much faster in solving huge mathematical problems than traditional way. Actually NumPy is coded in both python and C, which can be listed as a reason that, it is fast. NumPy is actually fast due to fixed type and contiguous mapping of memory. In laymen language a single value is not given so much respect as in a list. In a list there even one value has properties like size, reference count, object type and object value.

Contagious memory mapping

You may not appreciate the use of NumPy, if you are a beginner. But when you are on something and things get messy with task like processing an array of 44 thousand element through multiple stages, NumPy comes really handy. Suddenly this is the best library you’ve know so far.

You can install NumPy using pip install function. Make sure that you have internet and do this-

1. Open cmd

2. Write pip install NumPy

(I have already installed numpy, so the requirement is already satisfied)

To master anything, the practice is the key. However to learn in least time, you need learn smart. Here is two smart tried and tested strategies to learn very fast:

CheatSheet by DataCamp

a. First install numpy and try most of the operations in the datasheet mention above. So that you get an idea of basic functions of numpy.

b. Now when you have all the basic experience, go on to solve problems. I have hand-picked some problems for you, going from easy to difficult. These problems are given with solutions, so you can go though. These question merely take 30 to 35 minutes.

2. Create a array with all element equal zero.

3. Write a NumPy program to create a 3x3 identity matrix

4. Write a NumPy program to convert numpy dtypes to native python types.

5. Write a NumPy program to reverse an array

6. Write a NumPy program to compute sum of all elements, sum of each column and sum of each row of an given array.

7. How to extract a particular column from 1D array of str?

8. Write a NumPy program to compute the cross product of two given vectors.

9. Write a NumPy program compute the inverse of a given matrix.

10. Write a NumPy program to sort a given array of shape 2 along the first axis, last axis and on flattened array

11. How to do probabilistic sampling in numpy?

12. How to find the most frequent value in a numpy array?

13. How to replace all values greater than a given value to a given cutoff?

14. How to compute the min-by-max for each row for a numpy array 2d?

15. Write a NumPy program to create a 2d array with 1 on the border and 0 inside of size n*n.

Add a comment

Related posts:

Using MDMA for the First Time

Ecstasy was a drug that made me feel heavy. A drug that somehow slithered its chemicals into my bloodstream opposite to what I had expected. Slowly resurrecting calm sensations that live inside my…

The Fine Art of Small Talk

The Fine Art of Small Talk, a Medium series by Karlo Krznarić

Provision a Meeting Room Display in Meeting Room 365

Once you create an account, you can log into your Meeting Room 365 Admin portal from any computer to manage the displays associated with your Office 365 Tenant. Simply visit…