{"id":31250518,"url":"https://github.com/yoshoku/numo-linalg-alt","last_synced_at":"2026-04-17T06:03:09.335Z","repository":{"id":315556829,"uuid":"1059116797","full_name":"yoshoku/numo-linalg-alt","owner":"yoshoku","description":"Numo::Linalg Alternative (numo-linalg-alt) is an alternative to Numo::Linalg.","archived":false,"fork":false,"pushed_at":"2026-04-12T14:55:27.000Z","size":711,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T16:28:29.538Z","etag":null,"topics":["gem","linear-algebra","numo","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/numo-linalg-alt","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yoshoku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-18T02:51:58.000Z","updated_at":"2026-04-12T14:55:30.000Z","dependencies_parsed_at":"2025-09-19T10:25:18.301Z","dependency_job_id":"f74d8a85-324b-4610-9e08-cd93dbb3a987","html_url":"https://github.com/yoshoku/numo-linalg-alt","commit_stats":null,"previous_names":["yoshoku/numo-linalg-alt"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/yoshoku/numo-linalg-alt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-linalg-alt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-linalg-alt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-linalg-alt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-linalg-alt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshoku","download_url":"https://codeload.github.com/yoshoku/numo-linalg-alt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-linalg-alt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31917372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","linear-algebra","numo","ruby"],"created_at":"2025-09-23T05:22:48.492Z","updated_at":"2026-04-17T06:03:09.330Z","avatar_url":"https://github.com/yoshoku.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Numo::Linalg Alternative\n\n[![Gem Version](https://badge.fury.io/rb/numo-linalg-alt.svg)](https://badge.fury.io/rb/numo-linalg-alt)\n[![Build Status](https://github.com/yoshoku/numo-linalg-alt/actions/workflows/main.yml/badge.svg)](https://github.com/yoshoku/numo-linalg-alt/actions/workflows/main.yml)\n[![BSD 3-Clause License](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://github.com/yoshoku/numo-linalg-alt/blob/main/LICENSE.txt)\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://gemdocs.org/gems/numo-linalg-alt/)\n\nNumo::Linalg Alternative (numo-linalg-alt) is an alternative to [Numo::Linalg](https://github.com/ruby-numo/numo-linalg).\nUnlike Numo::Linalg, numo-linalg-alt depends on [Numo::NArray Alterntive](https://github.com/yoshoku/numo-narray-alt).\nPlease note that this gem was forked from [Numo::TinyLinalg](https://github.com/yoshoku/numo-tiny_linalg),\nnot Numo::Linalg, so its version numbering rule is not compatible with that of Numo::Linalg.\n\nThe project owner has the utmost respect for Numo::Linalg and its creator, Prof. [Masahiro Tanaka](https://github.com/masa16).\nThis project is in no way intended to adversely affect the development of the original Numo::Linalg.\n\n## Installation\n\nnumo-linalg-alt uses [OpenBLAS](https://github.com/OpenMathLib/OpenBLAS) as the default backend library.\nIf BLAS/LAPACKE-related libraries and include files are not found during installation,\nthe gem will automatically download and build OpenBLAS from source.\nThis process can significantly increase installation time,\nso pre-installing OpenBLAS is recommended.\n\nInstall the OpenBLAS.\n\nmacOS:\n\n```sh\n$ brew install openblas\n```\n\nUbuntu:\n\n```sh\n$ sudo apt-get install libopenblas-dev liblapacke-dev\n```\n\nInstall the gem and add to the application's Gemfile by executing.\n\nmacOS:\n\n```sh\n$ bundle config build.numo-linalg-alt \"--with-opt-dir=/opt/homebrew/opt/openblas\"\n$ bundle add numo-linalg-alt\n```\n\nUbuntu:\n\n```sh\n$ bundle add numo-linalg-alt\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing.\n\nmacOS:\n\n```sh\n$ gem install numo-linalg-alt -- --with-opt-dir=/opt/homebrew/opt/openblas\n```\n\nUbuntu:\n\n```sh\n$ gem install numo-linalg-alt\n```\n\n### Using alternative backend libraries\n\nThe `--with-blas` and `--with-lapacke` options allow you to specify which BLAS/LAPACKE libraries\nto use as the backend. The following instructions are intended for Ubuntu.\n\n#### BLIS\n\nInstall the BLIS:\n\n```sh\n$ sudo apt-get install libblis-dev liblapacke-dev\n```\n\nTo use BLIS as the BLAS library, execute the following gem command.\nThe `--with-lapacke` option is not required as LAPACKE is automatically selected.\n\n```sh\n$ gem install numo-linalg-alt -- --with-blas=blis\n```\n\n#### Intel MKL\n\nInstall the Intel MKL:\n\n```sh\nsudo apt-get install intel-mkl\n```\n\nRun the following command to use Intel MKL's `mkl_lapacke.h` as `lapacke.h`:\n\n```sh\nsudo update-alternatives --install /usr/include/x86_64-linux-gnu/lapacke.h lapacke.h-x86_64-linux-gnu /usr/include/mkl/mkl_lapacke.h 10\n```\n\nTo use Intel MKL as the BLAS/LAPACKE libraries, execute the following gem command.\nThe `--with-lapacke` option is not required as the `mkl_rt` library includes LAPACKE functions.\n\n```sh\n$ gem install numo-linalg-alt -- --with-blas=mkl_rt\n```\n\n## Documentation\n\n- [API Documentation](https://gemdocs.org/gems/numo-linalg-alt/0.4.1/)\n- [Comparison with scipy.linalg and numpy.linalg](https://github.com/yoshoku/numo-linalg-alt/wiki/Comparison-with-scipy.linalg-and-numpy.linalg)\n\n## Usage\n\nAn example of singular value decomposition.\n\n```ruby\nrequire 'numo/linalg'\n\nx = Numo::DFloat.new(5, 2).rand.dot(Numo::DFloat.new(2, 3).rand)\n# =\u003e\n# Numo::DFloat#shape=[5,3]\n# [[0.104945, 0.0284236, 0.117406],\n#  [0.862634, 0.210945, 0.922135],\n#  [0.324507, 0.0752655, 0.339158],\n#  [0.67085, 0.102594, 0.600882],\n#  [0.404631, 0.116868, 0.46644]]\n\ns, u, vt = Numo::Linalg.svd(x, job: 'S')\n\nz = u.dot(s.diag).dot(vt)\n# =\u003e\n# Numo::DFloat#shape=[5,3]\n# [[0.104945, 0.0284236, 0.117406],\n#  [0.862634, 0.210945, 0.922135],\n#  [0.324507, 0.0752655, 0.339158],\n#  [0.67085, 0.102594, 0.600882],\n#  [0.404631, 0.116868, 0.46644]]\n\nputs (x - z).abs.max\n# =\u003e 4.440892098500626e-16\n```\n\n## Development\n\npreparation:\n\n```shell\n$ git clone https://github.com/yoshoku/numo-linalg-alt\n$ cd numo-linalg-alt\n$ bundle install\n```\n\nbuild and test:\n\n```\n$ bundle exec rake compile\n$ bundle exec rake test\n```\n\nlinter:\n\n```shell\n$ bundle exec rubocop\n$ clang-format --dry-run --Werror --style=file ext/**/*.h ext/**/*.c\n```\n\nThis project follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).\nPlease run `npm install` to set up husky and commitlint for commit message validation:\n\n```shell\n$ npm install\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-linalg-alt.\nThis project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/numo-linalg-alt/blob/main/CODE_OF_CONDUCT.md).\n\n## Code of Conduct\n\nEveryone interacting in the Numo::Linalg Alternative project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/numo-linalg-alt/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [BSD-3-Clause License](https://opensource.org/licenses/BSD-3-Clause).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fnumo-linalg-alt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshoku%2Fnumo-linalg-alt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fnumo-linalg-alt/lists"}