Skip to content

Nikesh443/Numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Numpy

README.md

Numpy Introduction and Performance Comparison

This notebook demonstrates:

  • How to use numpy for array operations.
  • A comparison of performance between native Python lists and numpy arrays.

Contents

  • Importing libraries: Initializes numpy and time.
  • Zipping two lists: Shows how zip can be used to combine two lists into pairs.
  • Performance comparison: Measures and prints the execution time for adding two large lists and two large numpy arrays.
  • Conclusion: Highlights that numpy performs faster than native Python lists for large array operations.

Requirements

  • Python 3.x
  • Numpy
pip install numpy

How to use

  1. Open this notebook in Jupyter Notebook or JupyterLab.
  2. Step through the cells and execute them in order.
  3. The output will show:
    • The result of zipping two small lists.
    • The time taken to add large native Python lists.
    • The time taken to add large numpy arrays.

Summary

This notebook illustrates: ✅ The ease of performing vectorized operations with numpy. ✅ The performance benefits of numpy over pure Python for large datasets.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published