What is NumPy
What is NumPy
Features of NumPy
NumPy has various features which make them popular over lists.
Some of these important features include:
A powerful N-dimensional array object
Sophisticated (broadcasting) functions
Tools for integrating C/C++ and Fortran code
Useful linear algebra, Fourier transform, and random number
capabilities
Arrays in NumPy
There are various ways of Numpy array creation in Python. They are as
follows:
Advanced indexing :
Advanced indexing returns a copy of data rather than a view of it. Advanced
indexing is of two types integer and Boolean.
Purely integer indexing :
When integers are used for indexing. Each element of first dimension is paired
with the element of the second dimension. So the index of the elements in this
case are (0,0),(1,0),(2,1) and the corresponding elements are selected.
Python
Matplotlib:
Matplotlib is a powerful plotting library in Python used for creating static,
animated, and interactive visualizations. Matplotlib’s primary purpose is to
provide users with the tools and functionality to represent data graphically,
making it easier to analyze and understand. It was originally developed by John D.
Hunter in 2003 and is now maintained by a large community of developers.
1. Line Chart
Line chart is one of the basic plots and can be created using
the plot() function. It is used to represent a relationship between two
data X and Y on a different axis.
2. Bar Chart
The bar plots can be plotted horizontally or vertically. A bar chart
describes the comparisons between the discrete categories. It can be
created using the bar() method.