Our primary objective is to develop a robust and comprehensive library for numerical and scientific computing. To facilitate a smooth transition from Python, we will primarily adhere to the conventions of numpy and scipy, while allowing deviations when they:
- Align with the design philosophy of the Mojo programming language.
- Significantly enhance performance, such as through the use of generics.
- Improve consistency in conventions, such as naming parameters and arguments.
NuMojo is currently in its early development stages. At this point, our focus is to stabilize the API and implement the majority of functionalities. If you notice any missing features, please consider developing them and submitting a pull request or creating a feature request.
- ✅ Implement the n-dimensional array type and support SIMD-compatible standard library math functions1.
- 🔄 Develop
numpy-like functions for mathematical, statistical, linear algebra, searching, sorting, etc.
✅ Completed:
- Basic
NDArray,ComplexNDArray, andMatrixtypes with comprehensive arithmetic operations - Full indexing and slicing support including negative indices
- Broadcasting support for operations between arrays and scalars
- Memory-efficient operations with contiguous and strided array support
- Printing and formatting system with configurable options
- Complex number operations with full arithmetic support
🔄 In Progress:
- View-based operations (awaiting Mojo language support for parameterized traits)
- GPU acceleration (awaiting Mojo language GPU support)
🔄 Planned:
- Fixed-dimension arrays (awaiting trait parameterization)
- More advanced indexing features (boolean masking, fancy indexing)
We are currently working on implementing basic numeric functions into NuMojo. The scope is similar to numpy. Functions on this page will be considered for gradual implementation in NuMojo.
✅ Implemented Modules:
Array Creation:
arange,linspace,logspace(with complex variants)zeros,ones,full,empty,eye,identity(with complex variants)*_likefunctions for creating arrays with same shape as existing arrays
Mathematical Functions:
- Trigonometric:
sin,cos,tan,asin,acos,atan,atan2,hypot - Hyperbolic: Full suite of hyperbolic functions
- Exponential/Logarithmic:
exp,log,log10,log2, power functions - Arithmetic:
add,subtract,multiply,divide,fmawith broadcasting - Extrema:
min,max,argmin,argmax - Rounding:
round,floor,ceil,trunc - Floating Point:
isnan,isinf,isfinite - Products/Sums: Element-wise and axis-based operations
Linear Algebra:
- Matrix Operations:
matmul(@operator),inv,transpose - Decompositions:
lu_decomposition,qr,eig(eigenvalues) - Solving:
solve,lstsq(least squares) - Norms:
det(determinant),trace
Logic Functions:
- Comparison: Element-wise comparisons (
equal,not_equal,less, etc.) - Array Contents:
all,any, content checking functions - Truth Testing: Boolean array operations
Array Manipulation:
- Reshaping:
reshape,transpose,squeeze - Joining/Splitting:
concatenate,stack,split - Indexing: Advanced slicing and indexing routines
Statistics:
- Averages:
mean,median, variance calculations - Basic statistical functions
Input/Output:
- File Operations: Text file reading/writing
- Formatting: Array display and string conversion
Sorting/Searching:
sort,argsortwith axis support- Search functions for finding elements
Random Sampling:
- Random number generation for arrays
- Various probability distributions
🔄 In Progress:
- More statistical functions (standard deviation, correlation, etc.)
- More comprehensive I/O support
For a concise overview of the directory layout and how core, routines, and operations fit together, see architecture.md.
- Enhanced I/O Support: Better file format support (CSV, HDF5, JSON)
- Performance Optimization: Further SIMD optimization and memory efficiency improvements
- Testing Coverage: Comprehensive test suite expansion for all implemented functions
- GPU Support: Implement GPU acceleration when Mojo language support becomes available
- Advanced Linear Algebra: Singular value decomposition (SVD), Cholesky decomposition
- Machine Learning Foundation: While avoiding ML algorithms in core, provide efficient primitives
- Sparse Arrays: Support for sparse matrix operations
- Distributed Computing: Multi-node array operations
- Parameterized Traits: Required for view-based operations and zero-copy slicing
- GPU Support: Required for GPU acceleration features
- Advanced Memory Management: For more sophisticated memory optimization
This roadmap is a living document and will evolve as the library and Mojo language capabilities mature.
Footnotes
-
Standard library functions that are SIMD-compatible. ↩