Saurav Jain (Open Source + Communities) Profile picture
Jul 21, 2021 โ€ข 7 tweets โ€ข 3 min read โ€ข Read on X
Five NumPy Functions a beginner should know about๐Ÿ๐ŸŒŸ

๐Ÿงต๐Ÿ‘‡
1โƒฃ ๐—ป๐—ฝ.๐—ฎ๐—ฟ๐—ฟ๐—ฎ๐˜†

In Numpy, we create arrays using the "array" function.

Numpy gives the power to create multi-dimensional arrays.

๐Ÿ”— Code
2โƒฃ ๐—ป๐—ฝ.๐˜€๐—ต๐—ฎ๐—ฝ๐—ฒ

The shape of an array is the number of elements in each dimension.

NumPy arrays have an attribute called shape that returns a tuple with each index having the number of corresponding elements.

๐Ÿ”— Code
3โƒฃ ๐—ป๐—ฝ.๐—ฟ๐—ฒ๐˜€๐—ต๐—ฎ๐—ฝ๐—ฒ

reshape is used to change the shape of the NumPy array without changing the elements of the array.

reshape is one the best function of NumPy, it helps a lot in calculations.

๐Ÿ”— Code
4โƒฃ ๐—ป๐—ฝ.๐—ฎ๐—ฟ๐—ผ๐˜‚๐—ป๐—ฑ

This mathematical function helps the user to evenly round array elements to given number of decimals

numpy.around(arr, decimals = 0, out = None)

decimal : [int, optional] Decimal places we want to round off

out : [optional] Output resulted array

๐Ÿ”— Code
5โƒฃ ๐—ป๐—ฝ.๐˜๐—ฟ๐—ฎ๐—ป๐˜€๐—ฝ๐—ผ๐˜€๐—ฒ

Remember, in your maths class, to find the transpose of a matrix you have to solve long calculations.

In NumPy, it can be done only in a single line using transpose.

It has no effect on a 1-D array!

๐Ÿ”— Code
Hey,

Thanks for reading the thread โค๏ธ

I post content about Python and Machine learning!!

If you like this thread, give it a retweet :)

Thanks

โ€ข โ€ข โ€ข

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

Keep Current with Saurav Jain (Open Source + Communities)

Saurav Jain (Open Source + Communities) 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 @Sauain

Feb 25, 2023
How to write beautiful Python code? ๐Ÿ’ฏ

Learn about PEP 8 Convention ๐Ÿงต๐Ÿ‘‡
๐—ฃ๐—˜๐—ฃ-๐Ÿด

-Want to write an "Eye-pleasing" Python code ๐Ÿ ๐Ÿ‘€?

-PEP is a thing you MUST know about while learning or writing a python code

-Python Enhancement Proposal

-Basically a guide to "๐—›๐—ผ๐˜„ ๐˜๐—ผ ๐˜„๐—ฟ๐—ถ๐˜๐—ฒ ๐—ฎ ๐—ฏ๐—ฒ๐—ฎ๐˜‚๐˜๐—ถ๐—ณ๐˜‚๐—น ๐—ฝ๐˜†๐˜๐—ต๐—ผ๐—ป ๐—ฐ๐—ผ๐—ฑ๐—ฒ?"
We all know that besides having logic and coding in any programming language, there is an important factor that is "coding style."

-How are we writing comments?
-How are we giving spaces?
-How to import libraries?
-etc

These things are very important to writing beautiful code!
Read 12 tweets
Feb 24, 2023
Six websites that will keep you updated about the latest trends in Python ๐Ÿ

Thread ๐Ÿงต๐Ÿ‘‡
1. @realpython

The best site for Python. It helped me a lot personally in the learning process.

๐Ÿ”— realpython.com
2. Python Blogs

A dedicated platform for learners and professionals for Python

๐Ÿ”— pythonblogs.com
Read 8 tweets
Feb 23, 2023
Five FREE Certifications which you can learn and add to your Resume ๐Ÿ˜‰๐Ÿ’ฏ

- Python
- Chatbot Development
- Machine Learning
- NLP

Thread ๐Ÿงต๐Ÿ‘‡
1. Data Flair

20+ Hours Course to learn Python Step by Step with a Certificate on the completion

๐Ÿ”— data-flair.training/python-course/
2. Programming Essentials in Python ( CISCO )

This course is a great place to learn Python โ€“ no prior programming knowledge is required. Completing the course earns you a Statement of Achievement.

๐Ÿ”— netacad.com/courses/prograโ€ฆ
Read 7 tweets
Nov 21, 2022
Programming is interesting if you are learning it from good resources.

5 courses that helped me learn programming concepts. ๐Ÿงต
1. CS50 by Harvard

Build strong basics of Computer Science and fundamentals.

2. @freeCodeCamp

Basics of programming by freecodecamp.

Read 7 tweets
Nov 15, 2022
Learning Classification in Supervised Machine Learning from Scratch ๐Ÿงต๐Ÿ‘‡
Classification, by name, means to classify things into sub-categories.

For example, our computers can differentiate between red and blue, cat and dog, pencil and pen, and so on.
Classification is the problem of identifying to which of a set of categories (subpopulations), a new observation belongs, based on a training set of data containing observations and whose categories membership is known.
Read 8 tweets
Nov 2, 2022
Five FREE courses for Machine Learning, Artificial Intelligence, NLP, Web Development, and Computer Programming from world-class universities like Stanford, MIT, Harvard, etc. ๐Ÿงต
1. Machine Learning by Stanford University

This is a playlist of all the lectures taken by Prof. Andrew Ng in Stanford's ML course.

๐Ÿ”—
2. Harvard CS 50

Learn the basics of computer science from Harvard University. This is CS50, an introduction to the intellectual enterprises of computer science and the art of programming.

๐Ÿ”—
Read 7 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

Don't want to be a Premium member but still want to support us?

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

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(