numpyCore C++ Documentation#
Welcome to the numpyCore C++ API documentation. This library provides a NumPy-compatible C++ implementation for high-performance numerical computing.
Contents:
- API Reference
- NDArray
- Slice
- MemoryPool
- BitGenerator
- Generator
- MT19937
- PCG64
- Philox
- RandomState
- SFC64
- Polynomial
- NPZWriter
- BoostInfo
- IPPInfo
- MKLInfo
- BroadcastIterator
- BroadcastView
- ArrayFlags
- AssertionError
- AutoTunedEigenSolver
- BenchmarkAnalyzer
- BenchmarkResult
- Block
- Block2x2
- BroadcastApplicator
- BroadcastWrapper
- BusdayCalendar
- COOMatrix
- CPUFeatures
- CRC32
- CSRMatrix
- CacheKeyHash
- CharArray
- ChebyshevPolynomial
- ChunkReader
- DFTDescriptor
- DFTError
- DLPackDeleter
- DataGenerator
- DeflateCompressor
- DeflationChecker
- ErrorHandling
- ExcludedParams
- ExternalSorter
- FieldDescriptor
- FieldSpec
- FrompyfuncInfo
- GeneralizedEigenDecomposition
- HermiteEPolynomial
- HermitePolynomial
- IPPBuffer
- IPPSortDispatcher
- IPPSortException
- IPPSortManager
- IndexBuilder
- IndexExpr
- IndexedArray
- IndexedArrayResult
- LAPACKError
- LaguerrePolynomial
- LegacyGenerator
- LegendrePolynomial
- LinAlgError
- MKLError
- MKLSparseHandle
- MaskedArray
- Matrix
- MatrixProperties
- MemoryInfo
- MemoryLayout
- MemoryMappedArray
- MemoryMapper
- MemoryPoolManager
- NDArrayAdvanced
- NDEnumerate
- NDIndex
- NDIter
- NDIterRange
- NDPointer
- NaNHandler
- NestedArray
- NestedIterLevel
- NestedIters
- NpzFile
- ObjectArrayIterator
- ObjectArrayRange
- PARDISOSolver
- PCG64DXSM
- ParallelConfig
- PerformanceDatabase
- PooledArray
- PrintOptionsContext
- PrintOptionsManager
- RealSchurDecomposition
- RecArrayCreation
- RecFunctions
- RecordArray
- RecordArrayFieldProxy
- RecordProxy
- RecordSorter
- RefinementResult
- ScalarBroadcast
- SeedSequence
- ShiftStrategy
- Signature
- SimpleCache
- SolverConfig
- SortFieldDescriptor
- SortingBenchmark
- SparseMatrix
- SpecialFunctionsBenchmark
- StringComparator
- StringRadixSort
- StructuredArray
- StructuredComparator
- StructuredDType
- StructuredRecord
- SuffixArray
- TeeStreambuf
- TestLogger
- Timer
- TimezoneDatabase
- TimezoneInfo
- TimezoneTransition
- TypeTraits
- Ufunc
- UfuncBase
- UfuncProfiler
- UfuncWithMethods
- UniqueAll
- VSLError
- VSLRandomStream
- VSLStatsTask
- Vectorize
- VectorizeOptions
- datetime64
- float16
- object
- str
- timedelta64
- vstring
- vunicode
- Top-Level Functions
- Quick Links
Overview#
numpyCore C++ is a header-only library that provides:
NDArray: Multi-dimensional array class with NumPy-like functionality
Mathematical functions: sin, cos, exp, log, sqrt, and more
Linear algebra: dot, matmul, solve, inv, svd, qr, eig
Random number generation: Various distributions with modern generators
FFT: Fast Fourier Transform operations
SIMD optimizations: AVX2/AVX-512 accelerated sorting and operations
Statistical functions: mean, std, var, histogram, percentile
Quick Start#
#include <numpy/np_ndarray.h>
using namespace numpy;
int main() {
// Create arrays
NDArray<double> a = np::arange<double>(12).reshape({3, 4});
NDArray<double> b = np::ones<double>({4, 2});
// Basic operations
auto c = np::dot(a, b);
std::cout << "Shape: " << c.shape() << std::endl;
// Statistics
auto mean_val = np::mean(a);
auto std_val = np::std(a);
// Random numbers
Generator gen(42);
auto random = gen.random({3, 3});
// Linear algebra
auto [u, s, vh] = np::linalg::svd(a);
return 0;
}
Installation#
numpyCore C++ is a header-only library. Simply include the headers:
#include <numpy/np_ndarray.h>
#include <numpy/np_linalg.h>
#include <numpy/np_random.h>
// or include everything:
#include <numpy/numpy.h>
Requirements#
C++20 compatible compiler (MSVC 2022, GCC 11+, Clang 14+)
Optional: Intel MKL for optimized linear algebra
Optional: Intel IPP for performance optimizations
Optional: Boost Math Library for special functions
API Reference#
See the API Reference for complete API documentation.