Day 3 of 100 Days of ML Code: NumPy
Tags: machinelearning, 100daysofcode, womenintech, codenewbie
Published: 2023-03-12 17:38:02

> "Success is not final, failure is not fatal: it is the courage to continue that counts." - Winston Churchill

On the third day of my #100daysofcode challenge, I learned NumPy (Numerical Python) a Python library that is used for scientific computing and data analysis. I referred various resources for this [Baiscs of NumPy](https://courses.analyticsvidhya.com/courses/take/Machine-Learning-Certification-Course-for-Beginners/lessons/26302998-basics-of-numpy-in-python) and [NumPy in One hour by freeCodeCamp](https://youtu.be/QUT1VHiLmmI).

**Introduction to NumPy**

NumPy is the fundamental package for scientific computing with python. It contains many other things:

- N-dimensional array object
- Broadcasting Functions
- Useful for linear algebra, Fourier transform and random number capabilities.

_Broadcasting means when you do any operation on the array that operation will get implemented on each element of the array_

**Difference between numpy array and list**

- Data type in NumPy should be same whereas it can be different in lists
- Faster to read less bytes of memory
- Contiguous memory
- No type checking when iterating through objects.

_List is built in int-type so it consists of four different things it consists Size, Refernce count, Object Type, Object Value._
This makes NumPy faster than Lists.

**Importing and Creating NumPy array**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ee2n4k4ave6lbeahqqq2.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/48g41le5kspgtw6c0apb.png)

**Broadcasting and Creating matrix**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d1pbmng42klbpddnct76.png)

**Creating Random arrays**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j5hq17k45cuezejb6gfa.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ylt1ngptmlqhgw35zl2p.png)

**Array Concatenation**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gmzmvb2tqnaa5i32c0jd.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5x4hoj2m45106w3c23rv.png)

**Accessing/ Changing specific elements, rows, columns**


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kpi2un86s3behe8qhgpk.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2osssg6olkpp9gbj736g.png)

## Conclusion

During my recent learning experience, I acquired knowledge on statistics, array manipulation such as reorganizing and stacking, as well as loading data from files. Additionally, I attended a Women Coders Meetup where I gained valuable insights, expanded my knowledge, and networked with individuals who share my interests. As a result, I took a break from my studies to attend this event.
I will continue listing my daily progress and try to remain consistent. Please do share your feedback on how I can my 100daysofcode challenge more productive. I'll see you tomorrow for my daily update.


- Follow me on Twitter: @purvamasurkar12
- Follow me on LinkedIn: @purvamasurkar12