A templatized header-only C++ implementation of the Python NumPy library for numerical computing.
NumCpp is a C++ library that implements the core functionality of Python's NumPy library, providing a templatized, header-only solution for numerical computing. It offers multi-dimensional array operations, mathematical functions, and linear algebra utilities with an API designed to mimic NumPy, enabling high-performance scientific computing in C++ environments.
C++ developers working on scientific computing, data analysis, machine learning, or numerical simulations who need NumPy-like array operations and mathematical functions in C++.
NumCpp provides a familiar NumPy API in C++ without requiring Python interoperability, offering header-only simplicity, modern C++ standards compliance, and seamless integration with existing C++ codebases for performance-critical applications.
C++ implementation of the Python Numpy library
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implements a wide range of NumPy functions with similar syntax, such as linspace, arange, and slicing via Slice objects, making it intuitive for Python developers transitioning to C++.
No linking required; simply include headers, which simplifies project setup and cross-platform development, as noted in the installation documentation.
Covers universal functions for basic math, exponentials, trigonometry, and linear algebra operations like norm, det, and inv, mirroring NumPy's extensive capabilities.
Supports C++17, 20, and 23 with compatibility across major compilers like GCC, Clang, and Visual Studio, ensuring integration with contemporary codebases.
The primary NdArray container is inherently 2D, with 1D arrays implemented as 1xN, and the DataCube for 3D storage is described as having limited usefulness, restricting true multi-dimensional operations.
Requires Boost library version 1.73+ for some functionalities, adding external dependency overhead and potential complexity in environments with strict dependency controls.
As a header-only library, extensive use can lead to increased compilation times, especially in large projects, due to template instantiation and code inclusion.