CuPy
CuPy is an open-source Python library providing a NumPy-compatible interface for GPU-accelerated numerical computing.
Fast Python: High performance techniques for large datasets
- How it is used
- Deploys NumPy-like array analysis on a GPU and provides a case for profiling GPU performance.
- How deep it goes
- Works through array residency, transfers, GPU-aware timing, and Mandelbrot kernels; leaves CUDA C details largely unexplored.
- Examples
- Benchmarks doubling a 5000 × 5000 matrix and generating a Mandelbrot image with an embedded CUDA C kernel.
- What you can do after
- Apply it via CuPy and cupyx.time.repeat to run GPU array operations and measure GPU execution time.
Read how Fast Python: High performance techniques for large datasets explains CuPy →
Starting Data Analytics with Generative AI and Python
CuPy is a Python array-computing library that provides GPU-accelerated operations with an interface modeled on NumPy.
- How it is used
- Accelerates bootstrap confidence-interval calculations by moving compatible array operations from the CPU to a CUDA-enabled GPU.
- How deep it goes
- Demonstrates installation and code conversion, but defers detailed CPU–GPU architecture and compatibility mechanics.
- Examples
- Uses a CUDA bootstrap_CI function, pip installation, CuPy percentile operations, and execution-time comparisons against optimized CPU code.
- What you can do after
- Apply it via CuPy by adapting NumPy-based array code for CUDA and returning results to NumPy when needed.
Read how Starting Data Analytics with Generative AI and Python explains CuPy →
Related concepts
- Numbauses · Numba is a Python compiler that uses just-in-time compilation to generate optimized machine code for numerical code, with support for CPU and GPU targets.
- NumPycontrasts with · NumPy is an open-source Python library for numerical computing that provides multidimensional arrays and operations on them.
- GPGPUuses · GPGPU is the use of graphics processing units to perform general-purpose computations, often by exploiting their parallel processing capabilities.
- GPUuses · A graphics processing unit (GPU) is a processor designed for highly parallel computation, especially graphics and data-parallel workloads.
- CUDAuses · CUDA is NVIDIA’s parallel computing platform and programming model for performing general-purpose computations on NVIDIA GPUs.
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.

