{"id":13440654,"url":"https://github.com/mateogianolio/vectorious","last_synced_at":"2025-05-15T10:06:08.524Z","repository":{"id":29262714,"uuid":"32795345","full_name":"mateogianolio/vectorious","owner":"mateogianolio","description":"Linear algebra in TypeScript.","archived":false,"fork":false,"pushed_at":"2024-06-16T09:54:25.000Z","size":44894,"stargazers_count":924,"open_issues_count":17,"forks_count":44,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-15T10:05:05.841Z","etag":null,"topics":["blas","high-performance-computing","javascript","linear-algebra","linear-algebra-library","machine-learning","matrix","typescript","vector"],"latest_commit_sha":null,"homepage":"https://docs.vectorious.org","language":"TypeScript","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/mateogianolio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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":"2015-03-24T11:49:44.000Z","updated_at":"2025-05-15T06:20:43.000Z","dependencies_parsed_at":"2023-01-14T14:45:26.314Z","dependency_job_id":"8cdbf319-5133-446d-be6a-e02266125f68","html_url":"https://github.com/mateogianolio/vectorious","commit_stats":{"total_commits":542,"total_committers":18,"mean_commits":30.11111111111111,"dds":0.3302583025830258,"last_synced_commit":"55e273aa49da6829f443e544c91a88cb3ec0dffe"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateogianolio%2Fvectorious","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateogianolio%2Fvectorious/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateogianolio%2Fvectorious/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateogianolio%2Fvectorious/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mateogianolio","download_url":"https://codeload.github.com/mateogianolio/vectorious/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319720,"owners_count":22051073,"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":["blas","high-performance-computing","javascript","linear-algebra","linear-algebra-library","machine-learning","matrix","typescript","vector"],"created_at":"2024-07-31T03:01:24.812Z","updated_at":"2025-05-15T10:06:03.488Z","avatar_url":"https://github.com/mateogianolio.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/mateogianolio/vectorious/raw/master/logo.gif\" alt=\"Vectorious Logo\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A linear algebra library, written in TypeScript and accelerated with C++ bindings to BLAS and LAPACK.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/vectorious.svg\" /\u003e \u003cimg src=\"https://img.shields.io/npm/dm/vectorious\" /\u003e \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/mateogianolio/vectorious/release.yml?branch=master\" /\u003e \u003cimg src=\"https://img.shields.io/codeclimate/maintainability/mateogianolio/vectorious\" /\u003e \u003cimg src=\"https://img.shields.io/codeclimate/coverage/mateogianolio/vectorious\" /\u003e\n\u003c/p\u003e\n\n### Installation\n\nFollow the installation instructions in [nlapack](https://github.com/nperf/nlapack) and [nblas](https://github.com/nperf/nblas) to get maximum performance.\n\n```bash\n# with C++ bindings\n$ npm install vectorious\n\n# or, if you don't want C++ bindings\n$ npm install vectorious --no-optional\n```\n\nThere are three output bundles exposed in this package.\n\n#### CommonJS\n\nA node.js bundle, can be found in `dist/index.js` and imported with the `require()` syntax:\n\n```typescript\nconst v = require('vectorious');\n```\n\n#### Browser\n\nA browser bundle, can be found in `dist/index.browser.js` and imported with the `\u003cscript\u003e` tag:\n\n```html\n\u003cscript src=\"dist/index.browser.js\" /\u003e\n```\n\nIt exposes a global variable named `v` in the `window` object and can be accessed like this:\n\n```html\n\u003cscript\u003e\n  const x = v.array([1, 2, 3]);\n\u003c/script\u003e\n```\n\n#### ES module\n\nAdded in version 6.1.0, vectorious exposes an ES module bundle at `dist/index.mjs` which can be imported using the `import` syntax:\n\n```typescript\nimport { array } from 'vectorious';\n\nconst x = array([1, 2, 3]);\n```\n\n### Usage\n\nUnless stated otherwise, all operations are in-place, meaning that the result of the operation overwrites data in the current (or in the static case leftmost) array. To avoid this, an explicit `copy` call is needed before the operation (`copy(x)` or `x.copy()`).\n\n```javascript\nimport { array, random, range } from 'vectorious';\n\n// Create a random 2x2 matrix\nconst x = random(2, 2);\n/*\narray([\n  [\n    0.26472008228302,\n    0.4102575480937958\n  ],\n  [\n    0.4068726599216461,\n    0.4589384198188782\n  ]\n], dtype=float64)\n*/\n\n// Create a one-dimensional vector with values from\n// 0 through 8 and reshape it into a 3x3 matrix\nconst y = range(0, 9).reshape(3, 3);\n/*\narray([\n  [ 0, 1, 2 ],\n  [ 3, 4, 5 ],\n  [ 6, 7, 8 ]\n], dtype=float64)\n*/\n\n// Add the second row of x to the first row of x\ny.slice(0, 1).add(y.slice(1, 2));\n/*\narray([\n  [ 3, 5, 7 ],\n  [ 3, 4, 5 ],\n  [ 6, 7, 8 ]\n], dtype=float64)\n*/\n\n// Swap the first and second rows of x\ny.swap(0, 1);\n/*\narray([\n  [ 3, 4, 5 ],\n  [ 3, 5, 7 ],\n  [ 6, 7, 8 ]\n], dtype=float64)\n*/\n\n// Create a 2x2x1 tensor\nconst z = array([\n  [[1], [2]],\n  [[3], [4]],\n]);\n/*\narray([\n  [ [ 1 ], [ 2 ] ],\n  [ [ 3 ], [ 4 ] ]\n], dtype=float64)\n*/\n```\n\n### Documentation\n\n- [**API Documentation**](https://docs.vectorious.org/vectorious/6.1.0/)\n\n### Examples\n\n**Basic**\n\n- [**Solving linear systems of equations**](https://github.com/mateogianolio/vectorious/tree/master/examples/solve.ts)\n- [**Using low-level BLAS routines**](https://github.com/mateogianolio/vectorious/tree/master/examples/blas.ts)\n\n**Machine learning**\n\n- [**Neural network**](https://github.com/mateogianolio/vectorious/tree/master/examples/neural-network.ts) (by [@lucidrains](https://github.com/lucidrains))\n- [**Logistic regression**](https://github.com/mateogianolio/vectorious/tree/master/examples/logistic-regression.ts)\n\n### Testing\n\nAll functions are accompanied with a `.spec.ts` file.\n\nThe Jest testing framework is used for testing and the whole test suite can be run using a single command:\n\n```sh\n$ npm test\n```\n\n### Benchmarks\n\nAll functions are accompanied with a `.bench.ts` file.\n\nRun all benchmarks with:\n\n```bash\n$ npm run benchmark\n```\n\nOr for a single function with:\n\n```\n$ npx ts-node src/core/abs.bench.ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateogianolio%2Fvectorious","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateogianolio%2Fvectorious","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateogianolio%2Fvectorious/lists"}