Piyal Banik Profile picture
👨‍🎓 MSc Student in Data Science 🤖 Machine Learning Lead @gdsc_cdtu 🎯 My goal is to make your Data Science & Machine Learning Journey Easy

Jul 1, 2021, 11 tweets

NumPy 🔥

It is a Linear Algebra Library for #Python, the reason it is so important for Data Science is that almost all of the libraries in the PyData Ecosystem rely on NumPy as one of their main building blocks👨‍🏫.

Here's everything you need🧵👇

#DataScience #100DaysOfCode

1⃣Numpy Arrays

NumPy arrays are the main way we use Numpy. Numpy arrays essentially come in two flavors: vectors and matrices. Vectors are strictly 1-d arrays and matrices are 2-d (but you should note a matrix can still have only one row or one column).

2⃣Built-in Methods

There are lots of built-in ways to generate Arrays
- zeros
- ones
- eye
- arange
- linspace

3⃣Random

Numpy also has lots of ways to create random number arrays:
- rand
- randn
- randint

4⃣Array Attributes and Methods

Let's discuss some useful attributes and methods of an array:
- shape
- reshape
- max
- min
- std
- var

5⃣Arithmetic

You can easily perform array with array arithmetic, or scalar with array arithmetic. Let's see some examples:

6⃣Universal Array Functions

Numpy comes with many universal array functions, which are essentially just mathematical operations you can use to perform the operation across the array. Let's show some common ones:

7⃣NumPy Indexing and Selection

- Bracket Indexing and Selection
- Indexing a 2D array (matrices)

For more visit the official site 👇

numpy.org

Credit for some of the above-mentioned code 👇

udemy.com/course/python-…

That's it for the thread 👋
A retweet for the first one would really mean a lot 🙏

Follow @PiyalBanik for more tweets on Data Science, Machine Learning, Python.

Feel free to DM.

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling