Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.06 KB

File metadata and controls

34 lines (22 loc) · 1.06 KB

NumPy Notes

Hands-on array computing. Conceptual linear algebra: ../math/math.md. Runnable examples: study.py.

Official reference: NumPy module structure.

Contents

Core idea

  • NumPy’s main object is the homogeneous multidimensional array — many like-typed items in one block
  • Dimensions of an array are called axes

Basics

  • One axis can hold coordinates along one dimension
  • Length of an axis = number of elements on that axis
    • Example: [6, 7, 8] has length 3

Types

  • Element types can be specified (beyond plain Python scalars)
  • Use NumPy dtypes such as numpy.float64, numpy.int16 for fixed-width numeric storage

Array (ndarray)

  • ndarray (also exposed as array) is NumPy’s array class
  • Build matrices (and higher-rank tensors) with chosen shapes and dtypes
  • Creation helpers and indexing practice are in study.py