Skip to content

ruby-numo/numo-linalg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

df12cfb · Dec 15, 2023
Feb 5, 2021
Jun 20, 2017
Mar 25, 2018
Nov 27, 2022
Dec 13, 2023
May 18, 2017
Dec 31, 2020
Jul 26, 2018
Apr 15, 2016
Mar 5, 2019
Jan 29, 2021
Jan 29, 2021
Jan 29, 2021

Repository files navigation

Numo::Linalg : Linear Algebra library with BLAS/LAPACK binding to Numo::NArray

Binder Build Status

GitHub | RubyGems

Under development!

Introduction

This is a binding of BLAS/LAPACK for Numo::NArray using dynamic linking loader. This design allows you to change backend libraries without re-compiling.

  • Matrix and vector products
    • dot, matmul
  • Decomposition
    • lu, lu_fact, lu_inv, lu_solve, ldl, cholesky, cho_fact, cho_inv, cho_solve, qr, svd, svdvals, orth, null_space
  • Matrix eigenvalues
    • eig, eigh, eigvals, eigvalsh
  • Norms and other numbers
    • norm, cond, det, slogdet, matrix_rank, matrix_power
  • Solving equations and inverting matrices
    • solve, lstsq, inv, pinv

Low-level modules

Installation

  • Install Numo::NArray

  • Install LAPACK or alternative package.

    • Numo::Linalg requires C-interface CBLAS and LAPACKE interface. These are included in LAPACK package.

    • Recommended: use one of following faster libraries:

    • Note that the performance depends on the backend library as shown in benchmark.

  • Install Numo::Linalg

$ gem install numo-linalg

or

$ git clone https://github.com/ruby-numo/numo-linalg.git
$ cd linalg
$ rake build
$ gem install pkg/numo-linalg-*.gem

Using

  • Load Numo::Linalg module with default backend:
require "numo/linalg"

Authors

  • Masahiro Tanaka
  • Makoto Kishimoto
  • Atsushi Tatsuma

Acknowledgments

  • This work is partly supported by 2016 Ruby Association Grant.

ToDo

  • More functions
  • write test
  • Documentation