Home Up PDF Prof. Dr. Ingo Claßen
Numpy Introduction - DSML

Creation of Numpy Arrays

  • create a variable np1 of typy numpy array using list [1, 2, 3, 4, 5]
  • explain generated code
  • create a variable np2 of typy numpy array using list of lists [[1, 2, 3, 4, 5], [10, 20, 30, 40, 50], [100, 200, 300, 400, 500]]
  • explain generated code
  • describe the concept of shapes of numpy arrays using np1 and np2

Basic Operations

  • generate examples of numpy functions using np1
  • generate examples of numpy functions using np2 that contain axis
  • generate examples for numpy reshape using np2
  • generate examples for numpy transpose using np2
  • generate examples for numpy matrix multiplication
  • describe the concept of matrix multiplication

Broadcasting

  • generate examples of numpy broadcasting in different dimensions, only in the traditional sense
  • explain the differences between row and column vectors
  • create examples of row and column vectors in numpy
  • explain broadcasting rules
  • illustrate broadcasting rules with code examples
  • illustrate broadcasting rules with explict expansion of compatible dimensions
  • turn broadcasting into point by point operations
  • provide code to illustrate