Mojo-Numerics-and-Algorithms-group / NuMojo

NuMojo is a library for numerical computing in Mojo 🔥 similar to numpy in Python.
Apache License 2.0
112 stars 15 forks source link

[add] `Matrix` type #107

Closed forFudan closed 3 weeks ago

forFudan commented 2 months ago

numojo.core.matrix module provides:

Because the number of dimension is known at the compile time, the Matrix type gains advantages in the running speed compared to the NDArray type when the users only want to deal with the matrices manipulation, and it can also be more consistent with numpy. For example:

TODO: In future, we can also make use of the trait ArrayLike to align the behavior of NDArray type and the Matrix type.