{"id":19466196,"url":"https://github.com/yoshoku/numo-tiny_linalg","last_synced_at":"2025-08-20T02:14:39.159Z","repository":{"id":162023164,"uuid":"634498517","full_name":"yoshoku/numo-tiny_linalg","owner":"yoshoku","description":"Numo::TinyLinalg is a subset library from Numo::Linalg consisting only of methods used in Machine Learning algorithms.","archived":false,"fork":false,"pushed_at":"2025-07-03T15:18:10.000Z","size":280,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-30T08:48:02.430Z","etag":null,"topics":["gem","linear-algebra","numo","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/numo-tiny_linalg","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}},"created_at":"2023-04-30T10:22:32.000Z","updated_at":"2025-07-03T12:22:41.000Z","dependencies_parsed_at":"2023-11-13T13:28:46.891Z","dependency_job_id":"5a8e3912-7df5-4cfe-a3aa-b36af916f65e","html_url":"https://github.com/yoshoku/numo-tiny_linalg","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/yoshoku/numo-tiny_linalg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-tiny_linalg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-tiny_linalg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-tiny_linalg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-tiny_linalg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshoku","download_url":"https://codeload.github.com/yoshoku/numo-tiny_linalg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-tiny_linalg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271252993,"owners_count":24726918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"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":"2024-11-10T18:26:06.998Z","updated_at":"2025-08-20T02:14:39.043Z","avatar_url":"https://github.com/yoshoku.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Numo::TinyLinalg\n\n[![Gem Version](https://badge.fury.io/rb/numo-tiny_linalg.svg)](https://badge.fury.io/rb/numo-tiny_linalg)\n[![Build Status](https://github.com/yoshoku/numo-tiny_linalg/actions/workflows/main.yml/badge.svg)](https://github.com/yoshoku/numo-tiny_linalg/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-tiny_linalg/blob/main/LICENSE.txt)\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/numo-tiny_linalg/doc/)\n\nNumo::TinyLinalg is a subset library from [Numo::Linalg](https://github.com/ruby-numo/numo-linalg) consisting only of methods used in Machine Learning algorithms.\nThe functions Numo::TinyLinalg supports are dot, det, eigh, inv, pinv, qr, solve, cholesky, cho_solve and svd.\n\nNote that the version numbering rule of Numo::TinyLinalg is not compatible with that of Numo::Linalg.\n\n## Installation\nUnlike Numo::Linalg, Numo::TinyLinalg only supports OpenBLAS as a backend library for BLAS and LAPACK.\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 --local build.numo-tiny_linalg \"--with-opt-dir=/opt/homebrew/Cellar/openblas/0.3.23/\"\n$ bundle add numo-tiny_linalg\n```\n\nUbuntu:\n\n```sh\n$ bundle add numo-tiny_linalg\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-tiny_linalg -- --with-opt-dir=/opt/homebrew/Cellar/openblas/0.3.23/\n```\n\nUbuntu:\n\n```sh\n$ gem install numo-tiny_linalg\n```\n\n## Usage\n\nAn example of singular value decomposition.\n\n```ruby\nrequire 'numo/tiny_linalg'\n\nNumo::Linalg = Numo::TinyLinalg unless defined?(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## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-tiny_linalg.\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-tiny_linalg/blob/main/CODE_OF_CONDUCT.md).\n\n## Code of Conduct\n\nEveryone interacting in the Numo::TinyLinalg project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/yoshoku/numo-tiny_linalg/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-tiny_linalg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshoku%2Fnumo-tiny_linalg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fnumo-tiny_linalg/lists"}