This document contains detailed release notes for each version of LinAlgKit.
This release introduces significant performance optimizations using Numba JIT compilation.
| Function | Standard | Fast (JIT) | Speedup |
|---|---|---|---|
mse_loss |
33.75ms | 2.82ms | 12.0x |
mae_loss |
34.86ms | 2.67ms | 13.1x |
leaky_relu |
30.16ms | 6.81ms | 4.4x |
gelu |
200.78ms | 76.44ms | 2.6x |
tanh |
37.33ms | 15.29ms | 2.4x |
swish |
100.27ms | 54.62ms | 1.8x |
elu |
65.14ms | 40.06ms | 1.6x |
sigmoid |
80.98ms | 54.71ms | 1.5x |
softplus |
108.80ms | 70.88ms | 1.5x |
fast ModuleA new high-performance module with Numba JIT-compiled functions:
from LinAlgKit import fast
# 12x faster loss computation
loss = fast.fast_mse_loss(predictions, targets)
# 4.4x faster activation
output = fast.fast_leaky_relu(x, alpha=0.01)
Available fast functions:
fast_sigmoid, fast_relu, fast_leaky_relu, fast_elufast_gelu, fast_swish, fast_tanh, fast_softplusfast_mse_loss, fast_mae_loss, fast_normalizeNew in-place methods that avoid memory allocation:
A.add_(B) # A += B in-place
A.sub_(B) # A -= B in-place
A.mul_(2.0) # A *= 2.0 in-place
A.hadamard_(B) # Element-wise multiply in-place
.T property - Transpose view (no copy)to_numpy_view() - Direct array access (no copy)transpose(copy=False) - Optional zero-copy transposenumba>=0.57.0 (for JIT acceleration)Major expansion with 50+ mathematical functions for deep learning.
sigmoid, relu, leaky_relu, elu, gelu, swishsoftplus, tanh, softmax, log_softmaxmse_loss - Mean Squared Errormae_loss - Mean Absolute Errorhuber_loss - Robust losscross_entropy_loss - Multi-class classificationbinary_cross_entropy - Binary classificationbatch_norm - Batch normalizationlayer_norm - Layer normalization (transformers)instance_norm - Instance normalization (style transfer)conv2d - 2D convolutionmax_pool2d, avg_pool2d - Poolingglobal_avg_pool2d - Global average poolingxavier_uniform, xavier_normal - For tanh/sigmoidhe_uniform, he_normal - For ReLU networksdropout, one_hot, clip, flatten, reshapenormalize, cosine_similarity, euclidean_distancepairwise_distances, numerical_gradientlu() - LU decomposition with partial pivotingqr() - QR decompositioncholesky() - Cholesky decompositionsvd() - Singular Value Decompositioneig() - Eigenvalues and eigenvectorseigvals() - Eigenvalues onlyeigh() - Symmetric eigenvalue decompositionsolve() - Solve Ax = binv() - Matrix inversepinv() - Moore-Penrose pseudoinverselstsq() - Least-squares solutionnorm() - Multiple norm typescond() - Condition numberrank() - Matrix rankMatrix - Double-precision (float64)MatrixF - Single-precision (float32)MatrixI - Integer matrixMatrix.identity(3) # 3x3 identity
Matrix.zeros(2, 3) # 2x3 zeros
Matrix.ones(4, 4) # 4x4 ones
transpose() - Transpositiontrace() - Sum of diagonaldeterminant() - LU-based O(n³)determinant_naive() - Recursive (small matrices)A + B - Element-wise additionA - B - Element-wise subtractionA * B - Matrix multiplication2 * A - Scalar multiplication# From NumPy
A = Matrix.from_numpy(np_array)
# To NumPy
np_array = A.to_numpy()
val = A[i, j] # Get element
A[i, j] = 5.0 # Set element
No breaking changes. All v0.1.0 code works unchanged.
New imports available:
import LinAlgKit as lk
# New activation functions
output = lk.relu(x)
output = lk.softmax(logits)
# New matrix methods
L = A.cholesky()
eigenvalues, eigenvectors = A.eig()
x = A.solve(b)
No breaking changes. Install numba for automatic acceleration:
pip install numba
Use fast module for best performance:
from LinAlgKit import fast
# Check if Numba is available
import LinAlgKit as lk
print(lk.HAS_NUMBA) # True if numba installed
See EXPANSION_PLAN.md for the complete roadmap.
v0.3.0 (Q1 2025)
v0.4.0 (Q2 2025)
v1.0.0 (2027)