NumPy array
A NumPy array, or ndarray, is a multidimensional array object with a defined shape and element data type, designed for efficient numerical computation.
Fast Python: High performance techniques for large datasets
- How it is used
- Represents image pixels and simulation grids for performance-conscious numerical processing.
- How deep it goes
- Works through shape, dtype, shared-memory views, and copy timings; defers internal memory organization to separate treatment.
- Examples
- Tests grayscale-image flipping and view timings, then stores zero, tiled, and random arrays with NumPy or Blosc.
- What you can do after
- Apply it via NumPy and pandas to inspect arrays, choose views or copies, and benchmark vectorized calculations.
Read how Fast Python: High performance techniques for large datasets explains NumPy array →
Pandas Workout: 200 exercises to make you a stronger data analyst
A NumPy array is a fixed-type multidimensional numerical array provided by NumPy.
- How it is used
- Supports pandas Series construction and numerical exercises requiring batches of generated integers.
- How deep it goes
- Explains array generation, bounds, length, and seeding, but does not develop array internals or multidimensional operations.
- Examples
- Uses ten seeded integers between 70 and 100, assigns month labels, and computes averages from the resulting Series.
- What you can do after
- Build reproducible integer arrays with np.random.default_rng and pass them into a pandas Series.
Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains NumPy array →
Distributed Machine Learning Patterns
A NumPy array is a multidimensional, in-memory data structure provided by the NumPy library.
- How it is used
- Uses NumPy arrays to hold, inspect, preprocess, and supply image datasets for TensorFlow model training.
- How deep it goes
- Explains array properties, concrete dimensions, value ranges, preprocessing, and memory-copy failure modes.
- Examples
- Demonstrates 60,000 grayscale 28 × 28 MNIST images, array inspection, scaling by 255, and Keras training inputs.
- What you can do after
- Apply it via TensorFlow and Keras to load, inspect, scale, train on, and evaluate image datasets.
Read how Distributed Machine Learning Patterns explains NumPy array →
Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi
An ndarray is a NumPy multidimensional array containing values of a specified data type.
- How it is used
- Represents camera frames and newly created image canvases used by OpenCV operations.
- How deep it goes
- Explains shape and dtype through camera images, then creates a zero-filled array for drawing without covering ndarray internals.
- Examples
- Uses a 640×480 camera frame and a black uint8 canvas with a circle, line, rectangle, and lowercase alphabet.
- What you can do after
- Apply it via NumPy and OpenCV to inspect captured images and create drawable image buffers.
Read how Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi explains NumPy array →
Related concepts
- arrayequivalent to · An array is an indexed, ordered collection of elements arranged in one or more dimensions, with elements accessed by position.
- NumPyimplemented by · NumPy is an open-source Python library for numerical computing that provides multidimensional arrays and operations on them.
- FAISSalternative to · FAISS is an open-source software library for efficient similarity search and clustering of dense vectors.
- memoryviewused by · A memoryview is a Python object that exposes a view of a memory buffer containing homogeneous data without copying it.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



