Lesson plan

Overall objectives

Objectives

  1. Understand the fundamentals of NumPy and its importance in scientific computing and bioinformatics

  2. Develop proficiency in creating, manipulating, and performing operations on NumPy arrays

  3. Apply NumPy’s computational capabilities to solve common bioinformatics data manipulation tasks

  4. Compare the efficiency and syntax advantages of NumPy versus standard Python for numerical computation

Specific Objectives

By the end of this workshop, participants will be able to:

  1. NumPy Foundations

    • Explain NumPy’s purpose and advantages over standard Python lists

    • Describe how NumPy leverages contiguous memory allocation for improved performance

  2. Array Creation and Structure

    • Create NumPy arrays of different dimensions from Python lists and other data sources

    • Examine array attributes such as shape, ndim, size, and dtype

  3. Data Types

    • Contrast Python and NumPy data types for numerical computation

    • Select appropriate NumPy data types for optimizing memory usage and computational precision

    • Understand and manage type coercion in array operations

  4. Indexing and Selection

    • Access and manipulate array elements using basic indexing

    • Extract subsets of data using slicing operations in multiple dimensions

    • Apply boolean masking and advanced filtering techniques to arrays

  5. Array Operations

    • Reshape and restructure arrays to better match analytical needs

    • Combine arrays using concatenation and splitting operations

    • Generate descriptive statistics using NumPy’s built-in functions

  6. Vectorization and Performance

    • Implement vectorized operations to replace traditional Python loops

    • Apply broadcasting to perform operations between arrays of different shapes

    • Optimize calculations for working with large biological datasets