NUMPY TUTORIAL

 


Course Content

Numpy Tutorial in Hindi

Numpy Tutorial :


What is Numpy ?

  • Array in general refers to a named group of homogeneous elements.
  • Numpy is a module in Python language and this module is mostly used in Data manipulation and machine learning tasks i.e. Scientific computing tasks.
  • Numpy Array is simply a grid that contains values of same type.

  • Why Numpy ?

  • Provides efficient storage. : It means creating a list or other data type which contain group of elements consume lot of memory of our system but NumPy is one of the best option for programmers to use storage efficiently as it saves lot of memory of our system.
  • It also provides better ways of handling data for processing. : It means NumPy arrays provide better ways or methods to handle data i.e. while using NumPy arrays the programmer has full control over data means he/she can handle each and every data of NumPy array.
  • It is fast.
  • It is easy to learn.

  • What is Jupyter ?

  • Jupter notebook is an open source web application that allows you to create and share documents that contain live code, visualization and narrative text.
  • Notebook has support for over 40 programming languages including Python, R etc.
  • Notebooks can be shared with other using email, Dropbox, Github and Jupyter Notebook Viewer.
  • Your code can even produce rich, interactive output.

  • Jupyter Overview :

    Jupyter allow user to create notebooks.

    When you import numpy as np, it describes that you have imported NumPy module in your python program with the alias or new name ‘np’. You can give any variable name instead of np but most commonly np is used as it also looks like acronym of NumPy.


    Type of Numpy Arrays :

  • (One Dimensional) arrays known as Vectors (have single row/column only).
  • Multi-Dimensional arrays known as Matrices (can have multiple rows and columns).

  • To create an array :

    Here we have created an array which contains 1 row and 4 columns. Creating a numpy array is a very simple process coz you can create an array using any data type which contains collection of elements such as List, Dictionary and Tuple.

    So, that’s how we can create a Single dimensional array.


    Dtype : Datatype or Dtype tells about the type of data stored in the ndarray.

    By default Numpy arrays are created with float data type. And every element of Numpy array is of same data type i.e. are homogenous.

    To specify data type for an Array :

    Here we have created an Array whose data type is int8.


    List of dtpye :


    Individual elements from Array :
    To access elements from Numpy Array :

    1 – Accessing Single Dimension Array :

    For 1-D array accessing element is very easy i.e. simply write <1-D Array>[].

    E.g.

    2 – Accessing Multi-Dimensional (2-D) Array :

    For 2-D array, Elements can be accessed as –

    <2-D array>[ , ] or

    <2-D array>[][ ]

    For E.g.

    No Source Code Associated With This Video

    Comments

    Popular posts from this blog

    java chapter11 practice question on abstruct class and interfaces

    DAY 12 -AZURE DP900(Microsoft Azure Data Fundamentals: Explore non-relational data in Azure)

    java exercise4