This repository contains a Jupyter notebook that provides an introduction to using Numba for just-in-time (JIT) compilation to optimize Python code. The notebook demonstrates how to use Numba to improve performance, understand its compilation modes, identify its limitations, and vectorize code.
Introduction_to_Numba.ipynb
: The main Jupyter notebook that covers the basics of Numba, including setup, usage, and examples.
At the end of this experiment, you will be able to:
- Use the
jit
decorator to improve performance - Understand the difference between Numba’s compilation modes
- Understand the limitations of Numba with examples
- Vectorize code for use as a ufunc
To get started with the notebook, follow these steps:
Ensure you have the following installed on your system:
- Python 3.x
- Jupyter Notebook or JupyterLab
- Necessary Python packages (listed in the
requirements.txt
file)
-
Clone the repository to your local machine:
git clone https://github.com/Praveen76/Introduction-to-NUMBA.git cd Introduction-to-NUMBA
-
Install the required Python packages:
pip install -r requirements.txt
-
Launch Jupyter Notebook or JupyterLab:
jupyter notebook
or
jupyter lab
-
Open the notebook
Introduction_to_Numba.ipynb
. -
Follow the instructions and run the cells in the notebook to learn about and use Numba for JIT compilation and performance optimization.
- The notebook contains various examples and use cases for Numba. Modify the examples as needed to fit your specific requirements.
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please feel free to submit a Pull Request or open an issue to improve this repository.
If you encounter any issues or have suggestions for improvement, please open an issue in the Issues section of this repository.
The code has been tested on Windows system. It should work well on other distributions but has not yet been tested. In case of any issue with installation or otherwise, please contact me on Linkedin
Happy coding!!
I’m a seasoned Data Scientist and founder of TowardsMachineLearning.Org. I've worked on various Machine Learning, NLP, and cutting-edge deep learning frameworks to solve numerous business problems.