Skip to content

NanoBiostructuresRG/NumpyTutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

206 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NumPy Tutorial

Version 1.0 - February, 2026. Monterrey

License: MIT License: CC BY 4.0

Version


Description

This NumpyTutorial is a hands-on guide designed to introduce you to NumPy and to good programming practices in Python. Throughout the material, you will find guided examples and a series of exercises and test cases that encourage you to actively practice what you learn, while you perform basic linear algebra operations and write more reliable code through testing and debugging. It is best used by working through the sections in order, running the examples, and solving the exercises yourself.

This tutorial is organized into three main parts:

  • Part 1: Introduction to NumPy

    1. Python Basics
    2. Using Google Colab for This Tutorial
    3. Basic Structure of Codes Used in This Tutorial
    4. NumPy Arrays
    5. Shape of Numpy Arrays
    6. Accessing NumPy Arrays
    7. Operations on NumPy Arrays
    8. Linear Algebra
    9. Saving and Loading Data with .npy and .npz Files
  • Part 2: Introduction to Assert Statements and Testing

  • Part 3: Debugging Your Code

  • Wrap-Up and Next Steps

To complete your training and receive credit, you must work through these sections and complete the two mandatory assessment notebooks:

  • numpy_python_basics.ipynb (Python basics)
  • numpy_tutorial_exercises.ipynb (Numpy exercises)

To avoid local installations and focus exclusively on coding, these notebooks are designed to be performed in Google Colab.


Purpose

The purpose of this notebook is to help you:

  • Become comfortable using NumPy for numerical computing
  • Understand and apply basic linear algebra operations in Python
  • Learn how to test your code using assert statements and NumPy’s testing tools
  • Develop debugging skills to find and fix errors more effectively
  • Build confidence in writing correct, readable, and maintainable scientific Python code

This tutorial is meant to be a learning resource, not a final reference.


Authors

Flavio F. Contreras-Torres
Tecnológico de Monterrey
Monterrey, Mexico


Versions

v.1.0 - February 2026


License

The content of this tutorial itself is licensed under the terms and conditions of the Creative Commons Attribution (CC BY 4.0) license, and the underlying source code used to format and display that content is licensed under the MIT license. See the LICENSE files for full details.

Attribution

If you use or adapt this material, please provide appropriate credit to the original authors and repository:

NanoBiostructures Research Group
GitHub: https://github.com/NanoBiostructuresRG

About

A beginner-friendly NumPy tutorial with exercises on linear algebra, testing, and debugging in Python.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors