NumPy: Introduction and Installation
Hello world! or Hello as it is said by non-coders, this blog is going to be about a feature of Python & so you have to know some basics of Python to understand this blog! So let's start….
NumPy is a fundamental or a general-purpose package of Python. It provides a smooth performing multidimensional array object and tools to operate this array. Below are some important features of NumPy:
- A powerful N-dimensional array object
- Tools for integrating C/C++ and Fortran code
- Sophisticated (broadcasting) functions
- Useful linear algebra, Fourier transform, and random number capabilities
- Also, it can be used as an efficient multi-dimensional container of generic data.
Installation
These steps are for Windows, Mac OS and Linux.
1. Install Anaconda (it will install all packages needed for the operations.)
- For writing and executing code, use notebooks in the Jupyter Lab for exploratory and interactive computing, Spyder or Visual Studio Code for writing scripts and packages.
- Use Anaconda Navigator to manage your packages and start Jupyter Lab, Spyder, or Visual Studio Code.
PIP and CONDA:
PIP and CONDA are 2 main tools to install Python packages, however, they work together to operate NumPy. To understand how they work we should know the difference between them.
The first difference is that CONDA is cross-language and can install Python whereas if you go with PIP, it only installs Python on your system and the packages.
Secondly, if you use PIP it installs from the Python Installation Programme which contains the most number of packages whereas CONDA has all popular packages.
The third distinction is that CONDA is an incorporated answer for overseeing bundles and conditions while with pip you might require another tool (there are many!) for managing conditions or complex conditions.
To install PIP: https://anaconda.org/anaconda/pip
To install CONDA: https://docs.anaconda.com/anaconda/user-guide/tasks/install-packages/