NumPy is a powerful #python library that helps us compute operations on primarily numbers, faster. It is an important tool for data science. πŸ’ͺ

Here are 5 powerful #NumPy functions that will help you in your projects!

#Thread β˜•

#MachineLearning #datascience #AI

Let's go! ⬇️
First let’s see the advantages of using NumPy : πŸ“ˆ

1️⃣ Uses low memory to store data.

2️⃣ We can create n-dimensional arrays.

3️⃣ Operations like indexing, broadcasting, slicing and matrix multiplication.

4️⃣ Finding elements in the array is easy.

5️⃣ Good documentation.
Function 1 : np.sort()

This returns a sorted copy of the array. The original array is not changed.

The arguments the function normally takes are -

1. The Array to be sorted.

2. Axis along which to sort.

3. The method/ algorithm used for sorting as β€œkind = ”.
Function 2 : np.count_nonzero()

Used to count number of nonzero elements in an array.

The arguments taken are -

1. Array from which the nonzero values are to be found.

2. Axis. (optional)

Returns the number of nonzero elements in an array OR along an axis.
Function 3 : numpy.where()

does one operation on those that satisfy the condition and another on those that do not satisfy the condition.

Arguments taken are -

1. Condition.
2. x β€” do x if condition True.
3. y β€” do y if condition False.

Returns an array with x and y executed.
Function 4 : numpy.compress()

Returns a slice of values that satisfy a conditional array. This function takes following arguments -

1. A 1D conditional array.

2. Array on which the compression is done.

3. Axis along which the compression is done.
Function 5 - numpy.trace()

Really cool function that returns sum of values along the diagonal of an array.

Arguments taken are -

1. An array.

2. Offset from diagonal.

3. Axis.

Returns an array with the sum along all the diagonals in the array.
We had a good look under the hood of NumPy documentation which is almost impossible to know 100%.

There are useful functions that can do a job efficiently and with less code. That’s the power of the NumPy library.

For more informative resources, follow @ml_india_! πŸ€“

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Machine Learning India

Machine Learning India Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ml_india_

17 Jun
When beginners start with #DataScience, the biggest pain point is finding good datasets for projects.
Luckily, there are many good public #datasets available! πŸ“ˆπŸ€“

Here are places you can find them! ⬇️⬇️⬇️

#Thread β˜•

#MachineLearning #datascience #AI

(1/8) Image
1️⃣ @fastdotai

Apart from providing amazing free courses, Fast AI has teamed up with AWS to provide free datasets for image classification, NLP, image localization and COCO projects.

πŸ‘‰ course.fast.ai/datasets

(2/8)
@fastdotai 2️⃣ Awesome Public Datasets

This is a rich github repo of carefully curated datasets from 35+ domains.

πŸ‘‰github.com/awesomedata/aw…

(3/8)
Read 8 tweets
15 Jun
πŸ™‹πŸ»β€β™€οΈ Free Machine Learning Course With Certification by Jovian: jovian.ai/learn/machine-…

Read this thread for details about this course! πŸ€“

#machinelearning #artificialintelligence #datascience #python Image
🦾 "Machine Learning with Python: Zero to GBMs" is a practical and beginner-friendly introduction to supervised machine learning, decision trees, and gradient boosting using Python and its ecosystem of ML libraries: scikit-learn, XGBoost, and LightGBM.
You will:
πŸ‘‰πŸΌ Watch hands-on coding-focused video tutorials.
πŸ‘‰πŸΌ Practice coding with cloud Jupyter notebooks.
πŸ‘‰πŸΌ Build an end-to-end real-world course project.
πŸ‘‰πŸΌ Earn a verified certificate of accomplishment.
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(