Numpy
TAKEAWAYS
02
Introduction &
Benefits
1 numpy (numeric Python) is a popular library
used for data analysis, machine learning and
scientific computing.
2 Any person doing data analysis or machine
learning in Python, uses numpy almost on a
daily basis.
3 Numpy arrays offers several benefits over plain
Python list such as,
Less memory consumption
Fast operations
Convenient APIs for variety of
mathematical functions
03
Basic Operations
1 You do not have to remember API syntax. In real
life, people always refer to numpy
documentation, ChatGPT or Google to know the
syntax.
2 sum(), min(), max(), std() are used for doing quick
statistical analysis.
3 ndim, itemsize, size, shape are the functions
used for figuring out an array's dimensions,
element byte size, total number of elements,
and the size of each dimension, respectively.
04
Slicing, Stacking,
Splitting
1 Numpy supports index and slicing operators
similar to Python native list.
2 [Link] and [Link] are used to stack two
numpy arrays horizontally and vertically.
3 [Link] and [Link] are used to split a numpy
array either horizontally or vertically.