{"id":23309924,"url":"https://github.com/himeyama/narray-fromfile","last_synced_at":"2025-08-22T11:32:10.145Z","repository":{"id":56885175,"uuid":"386380993","full_name":"Himeyama/narray-fromfile","owner":"Himeyama","description":"倍精度浮動小数点のバイナリファイルを NArray 行列として読み(書き)します。","archived":false,"fork":false,"pushed_at":"2021-07-29T13:12:33.000Z","size":748,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-19T16:03:25.485Z","etag":null,"topics":["gem","narray","ruby"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/narray-fromfile","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Himeyama.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-15T17:59:21.000Z","updated_at":"2021-07-29T13:12:36.000Z","dependencies_parsed_at":"2022-08-21T00:20:35.636Z","dependency_job_id":null,"html_url":"https://github.com/Himeyama/narray-fromfile","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himeyama%2Fnarray-fromfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himeyama%2Fnarray-fromfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himeyama%2Fnarray-fromfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Himeyama%2Fnarray-fromfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Himeyama","download_url":"https://codeload.github.com/Himeyama/narray-fromfile/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230496028,"owners_count":18235249,"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","narray","ruby"],"created_at":"2024-12-20T13:13:29.138Z","updated_at":"2024-12-20T13:13:29.734Z","avatar_url":"https://github.com/Himeyama.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# narray-fromfile\n\n[![build](https://github.com/Himeyama/narray-fromfile/actions/workflows/build.yml/badge.svg)](https://github.com/Himeyama/narray-fromfile/actions/workflows/build.yml) [![Gem Version](https://badge.fury.io/rb/narray-fromfile.svg)](https://badge.fury.io/rb/narray-fromfile)\n\n改良版: ![numo-binrw](https://github.com/Himeyama/numo-binrw)\n\nいろいろ改良したので、こっち ↑ がおすすめです。書き方は似ていますがメソッド名が異なり互換はありません。\n\n## 概要\n倍精度浮動小数点のバイナリファイルを NArray 行列として読み(書き)します。\n\n**単精度浮動小数点** は対応していません。\n\n## インストール\n\n```sh\ngem install narray-fromfile\n```\n\n---\n\nGitHub から、`narray-fromfile` をインストールするには以下のコマンドを実行します。\n```sh\ngem install specific_install\ngem specific_install -l \"git://github.com/himeyama/narray-fromfile.git\"\n```\n\n\n### Gemfile に記述する場合は以下のように\n\n```sh\ngem \"narray-fromfile\"\n```\n\n---\n\nGitHub からインストールしたい場合は、\n\n```rb\ngem \"narray-fromfile\", github: \"himeyama/narray-fromfile.git\", branch: :main\n```\n\n## サンプル\n\n### 書き込み\n```rb\nrequire \"numo/narray\"\nrequire \"fromfile\"\n\na = Numo::DFloat[1..256].reshape(16, 16)\na.tofile(\"data.bin\")\n```\n\n### 読み込み\n```rb\nrequire \"numo/narray\"\nrequire \"fromfile\"\n\na = Numo::DFloat.fromfile(\"data.bin\").reshape(16, 16)\n# 行と列のサイズは保存されないので、読み込み後 reshape する。\n```\n\n### 確認\n```sh\nod -t fD data.bin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimeyama%2Fnarray-fromfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhimeyama%2Fnarray-fromfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhimeyama%2Fnarray-fromfile/lists"}