Introduction of Numpy

A PHP Error was encountered

Severity: Warning

Message: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

Filename: blog/post_details.php

Line Number: 38

Backtrace:

File: /home/solutio1/public_html/application/views/blog/post_details.php
Line: 38
Function: strtotime

File: /home/solutio1/public_html/application/controllers/Blog.php
Line: 14
Function: view

File: /home/solutio1/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

Filename: blog/post_details.php

Line Number: 38

Backtrace:

File: /home/solutio1/public_html/application/views/blog/post_details.php
Line: 38
Function: date

File: /home/solutio1/public_html/application/controllers/Blog.php
Line: 14
Function: view

File: /home/solutio1/public_html/index.php
Line: 315
Function: require_once

2019-08-19
Omsingh Bais

Introduction to Numpy

 

NumPy stands for "Numeric Python" or "Numerical Python" which is python package used for the computation and processing of the multidimensional and single dimensional array elements and also useful for linear algebra, Fourier transform, and random number operation.

Numpy become famous as an alternative to Matlab because Matlab is not an open source you have to purchase paid license version where as numpy is open source.

The combination of Numpy, Scipy, Matplotlib is used as the replacement of Matlab because python is much easier programming language than Matlab. So python it becomes the first choice for the data scientist.

Advantage of Numpy :

  • Multidimensional arrays
  • Scientific computation
  • Fourier transforms & shapes manipulation.
  • Element by element operations
  • A method for processing array
  • Easily interact with other python library.

Numpy installation :

Standard Python doesn't come with NumPy module. We have to install NumPy using popular Python package installer, pip. Execute the following command.

It is best practice to install NumPy with the SciPy. The binary distribution of the SciPy stack is specific to the operating systems.

Windows :

For windows if we install Anaconda package Pandas,scipy will be installed by default.

Or

 

Linux :

In Linux, the different package managers are used to install the SciPy stack. Use follwing command to install the numpy.

$ sudo apt-get install python-numpy
$ python-scipy python-matplotlibipythonipythonnotebook python-pandas  
$ python-sympy python-nose  

To install NumPy, run the following command. 

Python setup.py install

 To check whether NumPy module is installed or not, import it from Python prompt.

import numpy

If it is not installed, the following error message will be displayed.

Traceback (most recent call last): 
   File "<pyshell#0>", line 1, in <module> 
      import numpy 
ImportError: No module named 'numpy'

Happy coding.....

 

  • Please give your suggestion if you find anything incorrect. contact us at team@solutionstouch.com

About author

Card image cap
Omsingh Bais

Having more than 1+ year experience in the data scientist domain.!

-Data Scientist

0 Comments