{"id":20101578,"url":"https://github.com/xtensor-stack/zarray","last_synced_at":"2025-10-18T06:49:57.057Z","repository":{"id":48534482,"uuid":"311353169","full_name":"xtensor-stack/zarray","owner":"xtensor-stack","description":"Dynamically typed N-D expression system based on xtensor","archived":false,"fork":false,"pushed_at":"2021-10-20T15:19:28.000Z","size":129,"stargazers_count":25,"open_issues_count":8,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T09:51:48.244Z","etag":null,"topics":["multidimensional-arrays","numpy","xtensor"],"latest_commit_sha":null,"homepage":"","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/xtensor-stack.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":"2020-11-09T13:49:07.000Z","updated_at":"2023-10-25T08:53:44.000Z","dependencies_parsed_at":"2022-09-10T06:13:37.601Z","dependency_job_id":null,"html_url":"https://github.com/xtensor-stack/zarray","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtensor-stack%2Fzarray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtensor-stack%2Fzarray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtensor-stack%2Fzarray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtensor-stack%2Fzarray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtensor-stack","download_url":"https://codeload.github.com/xtensor-stack/zarray/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252633905,"owners_count":21779944,"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":["multidimensional-arrays","numpy","xtensor"],"created_at":"2024-11-13T17:25:49.953Z","updated_at":"2025-10-18T06:49:52.010Z","avatar_url":"https://github.com/xtensor-stack.png","language":"C++","readme":"[![Azure Pipelines](https://dev.azure.com/xtensor-stack/xtensor-stack/_apis/build/status/xtensor-stack.zarray?branchName=master)](https://dev.azure.com/xtensor-stack/xtensor-stack/_build/latest?definitionId=10\u0026branchName=master)\n[![Join the Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/QuantStack/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nDynamically typed N-D expression system based on [xtensor](thhps://github.com/xtensor-stack/xtensor).\n\n## Introduction\n\n`zarray` is a dynamically typed N-D expression system built on top of [xtensor](thhps://github.com/xtensor-stack/xtensor).\n\n## Installation\n\n### Package managers\n\nWe provide a package for the mamba (or conda) package manager:\n\n```bash\nmamba install -c conda-forge zarray\n```\n\n### Install from sources\n\n`zarray` is a header-only library.\n\nYou can directly install it from the sources:\n\n```bash\ncmake -D CMAKE_INSTALL_PREFIX=your_install_prefix\nmake install\n```\n\n## Dependencies\n\n`zarray` depends on `xtensor` and `nlohmann_json`:\n\n| `zarray` | `xtensor` | `nlohmann_json` |\n|----------|-----------|-----------------|\n|  master  |  0.23.8   |  3.2.0          |\n|  0.1.0   |  0.23.8   |  3.2.0          |\n|  0.0.6   |  0.23.8   |  3.2.0          |\n\n## Usage\n\n**Initialize a 2-D array and compute the sum of one of its rows and a 1-D array.**\n\n```cpp\n#include \u003czarray/zarray.hpp\u003e\n\nxt::zarray arr1 =\n  {{1.0, 2.0, 3.0},\n   {4.0, 5.0, 6.0},\n   {7.0, 8.0, 9.0}};\n\nxt::zarray arr2 =\n  {5.0, 6.0, 7.0};\n\nxt::zarray res = xt::strided_view(arr1, {1, xt::all()}) + arr2;\nstd::cout \u003c\u003c res \u003c\u003c std::endl;\n```\n\nOutputs:\n\n```\n{7, 11, 14}\n```\n\n**Initialize a 1-D array and reshape it inplace.**\n\n```cpp\n#include \u003czarray/zarray.hpp\u003e\n\nxt::zarray arr =\n  {1, 2, 3, 4, 5, 6, 7, 8, 9};\n\narr.reshape({3, 3});\n\nstd::cout \u003c\u003c arr \u003c\u003c std::endl;\n```\n\nOutputs:\n\n```\n{{1, 2, 3},\n {4, 5, 6},\n {7, 8, 9}}\n```\n\n## License\n\nWe use a shared copyright model that enables all contributors to maintain the\ncopyright on their contributions.\n\nThis software is licensed under the BSD-3-Clause license. See the\n[LICENSE](LICENSE) file for details.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtensor-stack%2Fzarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtensor-stack%2Fzarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtensor-stack%2Fzarray/lists"}