{"id":16977869,"url":"https://github.com/jcmgray/autoray","last_synced_at":"2026-03-07T00:06:33.558Z","repository":{"id":50083260,"uuid":"179381368","full_name":"jcmgray/autoray","owner":"jcmgray","description":"Abstract your array operations.","archived":false,"fork":false,"pushed_at":"2026-03-03T08:28:16.000Z","size":3046,"stargazers_count":164,"open_issues_count":3,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-03-03T12:25:02.253Z","etag":null,"topics":["array","dask","deep-learning","jax","lazy","machine-learning","numpy","python","pytorch","tensor","tensorflow"],"latest_commit_sha":null,"homepage":"https://autoray.readthedocs.io","language":"Python","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/jcmgray.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-03T22:45:59.000Z","updated_at":"2026-03-03T08:26:37.000Z","dependencies_parsed_at":"2023-02-14T10:50:16.172Z","dependency_job_id":"e4152d4e-f383-4fb8-a318-68409e46acd8","html_url":"https://github.com/jcmgray/autoray","commit_stats":{"total_commits":263,"total_committers":7,"mean_commits":37.57142857142857,"dds":0.09505703422053235,"last_synced_commit":"a09d42f3afb98e7da20553d0631bab6faf44a5cf"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/jcmgray/autoray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fautoray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fautoray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fautoray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fautoray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcmgray","download_url":"https://codeload.github.com/jcmgray/autoray/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcmgray%2Fautoray/sbom","scorecard":{"id":511568,"data":{"date":"2025-08-11","repo":{"name":"github.com/jcmgray/autoray","commit":"e2553aa08311e0e8aadee4ec869b7306a096eb0a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Maintained","score":10,"reason":"19 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/pypi-release.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:84: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:90: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pypi-release.yml:112: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/pypi-release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/jcmgray/autoray/tests.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/pypi-release.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/pypi-release.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/pypi-release.yml:69","Info:   0 out of   8 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   1 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/pypi-release.yml:72"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}}]},"last_synced_at":"2025-08-20T00:40:08.285Z","repository_id":50083260,"created_at":"2025-08-20T00:40:08.285Z","updated_at":"2025-08-20T00:40:08.285Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30044640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T10:53:31.691Z","status":"ssl_error","status_checked_at":"2026-03-03T10:53:22.041Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["array","dask","deep-learning","jax","lazy","machine-learning","numpy","python","pytorch","tensor","tensorflow"],"created_at":"2024-10-14T01:29:59.213Z","updated_at":"2026-03-07T00:06:33.550Z","avatar_url":"https://github.com/jcmgray.png","language":"Python","readme":"![autoray-header](https://github.com/jcmgray/autoray/assets/8982598/c5cb89bf-cc16-4345-8796-e0bd98dc2a15)\n\n[![tests](https://github.com/jcmgray/autoray/actions/workflows/tests.yml/badge.svg)](https://github.com/jcmgray/autoray/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/gh/jcmgray/autoray/branch/main/graph/badge.svg?token=Q5evNiuT9S)](https://codecov.io/gh/jcmgray/autoray)\n[![Docs](https://readthedocs.org/projects/autoray/badge/?version=latest)](https://autoray.readthedocs.io)\n[![PyPI](https://img.shields.io/pypi/v/autoray?color=teal)](https://pypi.org/project/autoray/)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/autoray/badges/version.svg)](https://anaconda.org/conda-forge/autoray)\n[![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)\n\n[`autoray`](https://autoray.readthedocs.io/en/latest) is a lightweight python AUTOmatic-arRAY library for\nabstracting your tensor operations. Primarily it provides an\n[*automatic* dispatch mechanism](https://autoray.readthedocs.io/en/latest/automatic_dispatch.html#)\nthat means you can write backend agnostic code that works for:\n\n* [numpy](https://github.com/numpy/numpy)\n* [pytorch](https://pytorch.org/)\n* [jax](https://github.com/google/jax)\n* [cupy](https://github.com/cupy/cupy)\n* [dask](https://github.com/dask/dask)\n* [autograd](https://github.com/HIPS/autograd)\n* [tensorflow](https://github.com/tensorflow/tensorflow)\n* [sparse](https://sparse.pydata.org/)\n* [paddle](https://github.com/paddlepaddle/paddle)\n* [mars](https://github.com/mars-project/mars)\n* ... and indeed **any** library that provides a numpy-*ish* api, even if it\n  knows nothing about `autoray`.\n\nBeyond that, abstracting the array interface allows you to:\n\n* *swap [custom versions of functions](https://autoray.readthedocs.io/en/latest/automatic_dispatch.html#functions)\n  for specific backends*\n* *trace through computations [lazily](https://autoray.readthedocs.io/en/latest/lazy_computation.html) without actually\n  running them*\n* *automatically [share intermediates and fold constants](https://autoray.readthedocs.io/en/latest/lazy_computation.html#sharing-intermediates)\n  in computations*\n* *compile functions with a [unified interface](https://autoray.readthedocs.io/en/latest/compilation.html) for different\n  backends*\n\n\n## Basic usage\n\nThe main function of `autoray` is\n[`do`](https://autoray.readthedocs.io/en/latest/autoapi/autoray/index.html#autoray.do),\nwhich takes a function\nname followed by `*args` and `**kwargs`, and automatically looks up (and\ncaches) the correct function to match the equivalent numpy call:\n\n```python\nimport autoray as ar\n\ndef noised_svd(x):\n    # automatic dispatch based on supplied array\n    U, s, VH = ar.do('linalg.svd', x)\n\n    # automatic dispatch based on different array\n    sn = s + 0.1 * ar.do('random.normal', size=ar.shape(s), like=s)\n\n    # automatic dispatch for multiple arrays for certain functions\n    return ar.do('einsum', 'ij,j,jk-\u003eik', U, sn, VH)\n\n# explicit backend given by string\nx = ar.do('random.uniform', size=(100, 100), like=\"torch\")\n\n# this function now works for any backend\ny = noised_svd(x)\n\n# explicit inference of backend from array\nar.infer_backend(y)\n# 'torch'\n```\n\nIf you don't like the explicit `do` syntax, or simply want a\ndrop-in replacement for existing code, you can also import the `autoray.numpy`\nmodule:\n\n```python\nfrom autoray import numpy as np\n\n# set a temporary default backend\nwith ar.backend_like('cupy'):\n    z = np.ones((3, 4), dtype='float32')\n\nnp.exp(z)\n# array([[2.7182817, 2.7182817, 2.7182817, 2.7182817],\n#        [2.7182817, 2.7182817, 2.7182817, 2.7182817],\n#        [2.7182817, 2.7182817, 2.7182817, 2.7182817]], dtype=float32)\n```\n\nAlternatively you can use\n[`autoray.get_namespace`](https://autoray.readthedocs.io/en/latest/autoapi/autoray/index.html#autoray.get_namespace)\nto get a backend specific (with optional default device and dtype) namespace\nobject, (c.f. the [Python Array Api](https://data-apis.org/array-api/latest/)):\n\n```python\nxp = ar.get_namespace(z)\nxp.einsum(\"ii-\u003ei\", z)\n```\n\nCustom backends and functions can be dynamically registered with:\n\n* [`register_backend`](https://autoray.readthedocs.io/en/latest/autoapi/autoray/index.html#autoray.register_backend)\n* [`register_function`](https://autoray.readthedocs.io/en/latest/autoapi/autoray/index.html#autoray.register_function)\n\nThe main documentation is available at [autoray.readthedocs.io](https://autoray.readthedocs.io/en/latest/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcmgray%2Fautoray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcmgray%2Fautoray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcmgray%2Fautoray/lists"}