This PR implements several functions of linear algebra so that we can calculate the inverse of a matrix, using LU decomposition algorithm. This also allows we solve the Ax=y.
The outcome is successfully tested against numpy.linalg.inv on 1000x1000 random matrix.
An example is at the end of this page.
Changelog of unreleased
Just as the Mojo repo does, I add changelog of unreleased changes in the docs folder. This allows users (and us) to track what have been added, removed, or fixed.
When we make a release, the items in this file will be edited and moved to changelog.md.
Example
import numojo as nm
fn main() raises:
var A = nm.NDArray("[[1,0,1], [0,2,1], [1,1,1]]")
var B = nm.math.linalg.solve.inverse(A)
print("Original matrix:")
print(A)
print("Reversed matrix:")
print(B)
print("Verify whether AB = I:")
print(A @ B)
Reverse of matrix
This PR implements several functions of linear algebra so that we can calculate the inverse of a matrix, using LU decomposition algorithm. This also allows we solve the
Ax=y
.The outcome is successfully tested against
numpy.linalg.inv
on 1000x1000 random matrix.An example is at the end of this page.
Changelog of unreleased
Just as the Mojo repo does, I add changelog of unreleased changes in the
docs
folder. This allows users (and us) to track what have been added, removed, or fixed.When we make a release, the items in this file will be edited and moved to
changelog.md
.Example
@shivasankarka , to be aligned with Mojo repo, I changed the folder name
doc
todocs
.