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
- QRResult
- SVDResult
- Polynomial
- NPZWriter
- BoostInfo
- IPPInfo
- MKLInfo
- BroadcastIterator
- BroadcastView
- ArnoldiResult
- ArrayFlags
- AutoTunedEigenSolver
- BalancingResult
- BandLUResult
- BenchmarkAnalyzer
- BenchmarkResult
- Block
- Block2x2
- BoostConfig
- BroadcastApplicator
- BroadcastWrapper
- BusdayCalendar
- COOMatrix
- CPUFeatures
- CRC32
- CSRMatrix
- CacheKeyHash
- CachedFunction
- CharArray
- ChebyshevPolynomial
- CholeskyDecomposition
- ComplexLess
- ComplexSchurResult
- DFTDescriptor
- DFTError
- DLPackDeleter
- DataGenerator
- DeflationChecker
- DivideConquerResult
- EigenDecomposition
- EigenResult
- ErrorHandling
- ExcludedParams
- ExternalSorter
- FieldDescriptor
- FieldSpec
- FrompyfuncInfo
- GeneralizedEigenDecomposition
- GeneralizedEigenResult
- HermiteEPolynomial
- HermitePolynomial
- HessenbergReduction
- HessenbergResult
- HouseholderBlock
- IPPBuffer
- IPPSortDispatcher
- IPPSortException
- IPPSortManager
- IRAMResult
- IndexBuilder
- IndexExpr
- IndexedArray
- IndexedArrayResult
- JacobiResult
- LAPACKError
- LSTSQResult
- LUDecomposition
- LaguerrePolynomial
- LeastSquaresResult
- LegacyGenerator
- LegendrePolynomial
- LinAlgError
- MKLConfig
- MKLError
- MKLSparseHandle
- MaskedArray
- MathBackendConfig
- Matrix
- MatrixProperties
- MemoryInfo
- MemoryLayout
- MemoryMappedArray
- MemoryMapper
- MemoryPoolManager
- NDArrayAdvanced
- NDEnumerate
- NDIndex
- NDIter
- NDIterRange
- NDPointer
- NaNAwareComparator
- NaNHandler
- NestedArray
- NestedIterLevel
- NestedIters
- NpzFile
- ObjectArrayIterator
- ObjectArrayRange
- PARDISOSolver
- PCG64DXSM
- ParallelConfig
- PerformanceDatabase
- PooledArray
- PrintOptionsContext
- PrintOptionsManager
- QRDecomposition
- RealSchurDecomposition
- RecArrayCreation
- RecFunctions
- RecordArray
- RecordArrayFieldProxy
- RecordProxy
- RecordSorter
- RefinementResult
- SVDDecomposition
- ScalarBroadcast
- SchurDecomposition
- SchurResult
- SeedSequence
- ShiftStrategy
- Signature
- SimpleCache
- SolverConfig
- SortFieldDescriptor
- SortingBenchmark
- SparseMatrix
- SpecialFunctionsBenchmark
- StringComparator
- StringRadixSort
- StructuredArray
- StructuredComparator
- StructuredDType
- StructuredRecord
- StructuredValueHash
- SymmetricEigenResult
- SymmetricGeneralizedEigenResult
- SymmetricIndefiniteResult
- Timedelta
- Timer
- Timestamp
- TimezoneDatabase
- TimezoneInfo
- TimezoneTransition
- TimsortRun
- TridiagonalEigenResult
- TridiagonalLUResult
- TupleFieldDescriptor
- TypeTraits
- Ufunc
- UfuncBase
- UfuncProfiler
- UfuncWithMethods
- UniqueAll
- UniqueCounts
- UniqueInverse
- UniqueValues
- VSLError
- VSLRandomStream
- VSLStatsTask
- Vectorize
- VectorizeInfo
- VectorizeOptions
- VectorizedFunction
- all_args_arithmetic
- datetime64
- float16
- has_ndarray_arg
- hash
- numeric_limits
- 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.