numpy.ndarray
The core data structure in NumPy — a multi-dimensional array of elements all of the same type. More efficient than Python lists for numerical data as elements are stored contiguously in memory. Shape describes the dimensions — (rows, cols) for 2D, (rows, cols, channels) for 3D. |
numpy.dtype
Describes the data type of elements stored in a numpy.ndarray. Common types are uint8 for images (0-255), float32 for floating point, and int32 for integers. The dtype determines how many bytes each element takes and how values are interpreted. |
numpy.uint8
An unsigned 8-bit integer type commonly used for image data. Can hold values from 0 to 255 — exactly the range of a single colour channel in an image. Values that exceed 255 wrap around rather than raising an error — a common source of bugs. |
Cheatography
https://cheatography.com
Python (Numpy) Cheat Sheet (DRAFT) by blakecromar
A cheatsheet on the Numpy package
This is a draft cheat sheet. It is a work in progress and is not finished yet.