{"id":19466177,"url":"https://github.com/yoshoku/numo-random","last_synced_at":"2025-04-25T09:32:37.357Z","repository":{"id":61974275,"uuid":"537942530","full_name":"yoshoku/numo-random","owner":"yoshoku","description":"Numo::Random provides random number generation with several distributions for Numo::NArray.","archived":false,"fork":false,"pushed_at":"2025-01-01T12:05:09.000Z","size":173,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T10:53:39.755Z","etag":null,"topics":["gem","random","ruby","statistics"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/numo-random","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","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}},"created_at":"2022-09-17T22:15:14.000Z","updated_at":"2025-01-01T12:05:13.000Z","dependencies_parsed_at":"2024-11-10T18:28:27.498Z","dependency_job_id":"df2720e8-32af-4595-8110-aaaf508bc38a","html_url":"https://github.com/yoshoku/numo-random","commit_stats":{"total_commits":70,"total_committers":1,"mean_commits":70.0,"dds":0.0,"last_synced_commit":"d94040c7cdee8a150844bda24f276e059238e0e5"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-random","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-random/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-random/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoshoku%2Fnumo-random/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoshoku","download_url":"https://codeload.github.com/yoshoku/numo-random/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250790269,"owners_count":21487780,"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","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","random","ruby","statistics"],"created_at":"2024-11-10T18:25:58.736Z","updated_at":"2025-04-25T09:32:37.092Z","avatar_url":"https://github.com/yoshoku.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Numo::Random\n\n[![Build Status](https://github.com/yoshoku/numo-random/actions/workflows/main.yml/badge.svg)](https://github.com/yoshoku/numo-random/actions/workflows/main.yml)\n[![Gem Version](https://badge.fury.io/rb/numo-random.svg)](https://badge.fury.io/rb/numo-random)\n[![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://github.com/yoshoku/numo-random/blob/main/LICENSE.txt)\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/numo-random/doc/)\n\nNumo::Random provides random number generation with several distributions for Numo::NArray.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'numo-random'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install numo-random\n\n## Usage\n\nAn example of generating random numbers according to the standard normal distribution:\n\n```ruby\nrequire 'numo/narray'\nrequire 'numo/gnuplot'\n\nrequire 'numo/random'\n\n# Creating random number generator.\nrng = Numo::Random::Generator.new(seed: 42)\n\n# Generating random numbers with a normal distribution.\nx = rng.normal(shape: [5000, 2], loc: 0.0, scale: 1.0)\n\n# Plotting the generated result.\nNumo.gnuplot do\n  set(terminal: 'png')\n  set(output: 'normal2d.png')\n  plot(x[true, 0], x[true, 1])\nend\n```\n\n![normal2d.png](https://user-images.githubusercontent.com/5562409/197376738-ee8d2b12-1902-4a12-bcf3-757461f2f2db.png)\n\n\nAn example of generating random numbers according to the Poisson distribution:\n\n```ruby\nrequire 'numo/narray'\nrequire 'numo/gnuplot'\n\nrequire 'numo/random'\n\n# Creating random number generator.\nrng = Numo::Random::Generator.new(seed: 9)\n\n# Generating random numbers with Poisson distribution.\nx = rng.poisson(shape: 10000, mean: 12)\n\n# Plotting the generated result.\nh = x.bincount\n\nNumo.gnuplot do\n  set(terminal: 'png')\n  set(output: 'poisson2d.png')\n  plot(h, with: 'boxes')\nend\n```\n\n![poisson2d.png](https://user-images.githubusercontent.com/5562409/201478863-61d31eb8-7c0b-4406-b255-fff29187a16a.png)\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/numo-random.\nThis project is intended to be a safe, welcoming space for collaboration,\nand contributors are expected to adhere to the [code of conduct](https://github.com/yoshoku/numo-random/blob/main/CODE_OF_CONDUCT.md).\n\n## License\n\nThe gem is available as open source under the terms of the [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fnumo-random","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoshoku%2Fnumo-random","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoshoku%2Fnumo-random/lists"}