A basic linear algebra implementation in C++ providing classes such as Vector and Matrix. All classes are binded into python.
License
DHL-LinAlg is Free Software licensed under the MIT license. It, in part, is based on ASC-bla and ASC-HPC which are also published under the MIT license.
Why use DHL-LinAlg?
DHL-LinAlg is fast
DHL-LinAlg is easy to use
from dhllinalg.bla import Matrix, InnerProduct
m = Matrix(200,100)
n = Matrix(100,200)
for i in range(m.shape[0]):
for j in range(m.shape[1]):
m[i,j] = i + 2 * j
n[:,i] = i
w = InnerProduct(m, n)
print(w)
DHL-LinAlg is compatible with other libraries
from dhllinalg.bla import Matrix
import numpy as np
m = Matrix(223,17)
n = Matrix(17,223)
for i in range(m.nrows):
for j in range(m.ncols):
m[i,j] = i * j
n[:,i] = 15-i
w = np.dot(np.asarray(m), np.asarray(n))
print(w)
DHL-LinAlg can write trace files
DHL-LinAlg is easy to install
pip install dhllinalg
Contents:
Information: