NumPy array
A NumPy array, or ndarray, is an n-dimensional array object with a defined shape and element data type, supporting efficient numerical computation.
Fast Python: High performance techniques for large datasets
- How it is used
- Uses arrays as a numerical data representation and as a performance-focused interface to image processing, pandas, Cython, and disk storage.
- How deep it goes
- Explains shape, dtype, views, copies, sharing checks, and benchmarks, then profiles Cython array access and compares compressed storage.
- Examples
- Uses a grayscale image flip, a pandas mean calculation, and zero-filled, tiled, and random arrays in disk-writing benchmarks.
- What you can do after
- Apply it via NumPy to inspect arrays, compare views with copies, and benchmark numerical and storage operations.
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 →
Also covered in
- Software Engineering for Data ScientistsIn early access (MEAP)
- Python How-To
- Software Design for Python Programmers
- Deep Learning with R, Third Edition
- The Complete Obsolete Guide to Generative AI
- Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
- Deep Learning with JAX
- Deep Learning with Python, Third Edition
- Evolutionary Deep Learning: Genetic algorithms and neural networks
What to know first
- PythonPython is a high-level, general-purpose, dynamically typed programming language with readable syntax and support for multiple programming paradigms.
- arrayAn array is an ordered collection of elements organized in one or more dimensions and accessible by position or index.
- listA list is an ordered collection of elements arranged in a sequence.
- loopA loop is a programming-language control-flow construct that repeatedly executes a block of instructions according to an iteration rule or continuation condition.
Related concepts
- NumPyimplemented by · NumPy is an open-source Python library for numerical computing, providing multidimensional arrays and operations on them.
- arrayequivalent to · An array is an ordered collection of elements organized in one or more dimensions and accessible by position or index.
- broadcast operationused by · A broadcast operation is a collective communication operation that distributes data from one participant to all participants in a group.
Questions about NumPy array
What is NumPy array?
A NumPy array, or ndarray, is an n-dimensional array object with a defined shape and element data type, supporting efficient numerical computation.
Which Manning books explain NumPy array?
Fast Python: High performance techniques for large datasets, Pandas Workout: 200 exercises to make you a stronger data analyst, Distributed Machine Learning Patterns and Build Your Own Robot: Using Python, CRICKIT, and Raspberry Pi.
What should I know before learning NumPy array?
Manning books that teach NumPy array usually introduce Python, array, list and loop first.
What is the difference between NumPy array and Dask array?
A NumPy array, or ndarray, is an n-dimensional array object with a defined shape and element data type, supporting efficient numerical computation. A Dask array is a chunked, potentially distributed array abstraction that represents computations over NumPy-like array blocks.
What is NumPy array also called?
NumPy array is also called ndarray.
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.



