{"id":31534494,"url":"https://github.com/34j/array-api-jit","last_synced_at":"2026-01-20T17:35:32.592Z","repository":{"id":304159327,"uuid":"1017996502","full_name":"34j/array-api-jit","owner":"34j","description":"JIT decorator supporting multiple array API compatible libraries","archived":false,"fork":false,"pushed_at":"2025-09-30T21:30:17.000Z","size":269,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T23:25:51.630Z","etag":null,"topics":["array-api","cupy","jax","jit","numba","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Python","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/34j.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["34j"]}},"created_at":"2025-07-11T12:36:58.000Z","updated_at":"2025-09-30T21:30:20.000Z","dependencies_parsed_at":"2025-07-11T13:41:59.026Z","dependency_job_id":"ec0bae1b-f113-492a-9c41-5e190377193d","html_url":"https://github.com/34j/array-api-jit","commit_stats":null,"previous_names":["34j/array-api-jit"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/34j/array-api-jit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Farray-api-jit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Farray-api-jit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Farray-api-jit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Farray-api-jit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/34j","download_url":"https://codeload.github.com/34j/array-api-jit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Farray-api-jit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277773072,"owners_count":25874559,"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","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-api","cupy","jax","jit","numba","pytorch"],"created_at":"2025-10-04T05:40:22.223Z","updated_at":"2025-10-04T05:40:25.115Z","avatar_url":"https://github.com/34j.png","language":"Python","readme":"# array API JIT\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/34j/array-api-jit/actions/workflows/ci.yml?query=branch%3Amain\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/34j/array-api-jit/ci.yml?branch=main\u0026label=CI\u0026logo=github\u0026style=flat-square\" alt=\"CI Status\" \u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://array-api-jit.readthedocs.io\"\u003e\n    \u003cimg src=\"https://img.shields.io/readthedocs/array-api-jit.svg?logo=read-the-docs\u0026logoColor=fff\u0026style=flat-square\" alt=\"Documentation Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/34j/array-api-jit\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/34j/array-api-jit.svg?logo=codecov\u0026logoColor=fff\u0026style=flat-square\" alt=\"Test coverage percentage\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/astral-sh/uv\"\u003e\n    \u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json\" alt=\"uv\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/astral-sh/ruff\"\u003e\n    \u003cimg src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\" alt=\"Ruff\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/pre-commit/pre-commit\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit\u0026logoColor=white\u0026style=flat-square\" alt=\"pre-commit\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/array-api-jit/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/array-api-jit.svg?logo=python\u0026logoColor=fff\u0026style=flat-square\" alt=\"PyPI Version\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/pyversions/array-api-jit.svg?style=flat-square\u0026logo=python\u0026amp;logoColor=fff\" alt=\"Supported Python versions\"\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/l/array-api-jit.svg?style=flat-square\" alt=\"License\"\u003e\n\u003c/p\u003e\n\n---\n\n**Documentation**: \u003ca href=\"https://array-api-jit.readthedocs.io\" target=\"_blank\"\u003ehttps://array-api-jit.readthedocs.io \u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/34j/array-api-jit\" target=\"_blank\"\u003ehttps://github.com/34j/array-api-jit \u003c/a\u003e\n\n---\n\nJIT decorator supporting multiple array API compatible libraries\n\n## Installation\n\nInstall this via pip (or your favourite package manager):\n\n```shell\npip install array-api-jit\n```\n\n## Usage\n\nSimply decorate your function with `@jit()`:\n\n```python\nfrom array_api_jit import jit\n\n\n@jit()\ndef my_function(x: Any) -\u003e Any:\n    xp = array_namespace(x)\n    return xp.sin(x) + xp.cos(x)\n```\n\n## Advanced Usage\n\nYou can specify the decorator, arguments, and keyword arguments for each library.\n\n```python\nfrom array_api_jit import jit\nfrom array_api_compat import array_namespace\nfrom typing import Any\nimport numba\n\n\n@jit(\n    {\"numpy\": numba.jit()},  # numba.jit is not used by default because it may not succeed\n    decorator_kwargs={\n        \"jax\": {\"static_argnames\": [\"n\"]}\n    },  # jax requires for-loop variable to be \"static_argnames\"\n    # fail_on_error: bool = False, # do not raise an error if the decorator fails (Default)\n    # rerun_on_error: bool = True, # re-run the original function if the wrapped function fails (NOT Default)\n)\ndef sin_n_times(x: Any, n: int) -\u003e Any:\n    xp = array_namespace(x)\n    for i in range(n):\n        x = xp.sin(x)\n    return x\n```\n\n## Contributors ✨\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## Credits\n\n[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-orange.json)](https://github.com/copier-org/copier)\n\nThis package was created with\n[Copier](https://copier.readthedocs.io/) and the\n[browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template)\nproject template.\n","funding_links":["https://github.com/sponsors/34j"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F34j%2Farray-api-jit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F34j%2Farray-api-jit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F34j%2Farray-api-jit/lists"}