{"id":30799221,"url":"https://github.com/arrayfire/arrayfire-py","last_synced_at":"2026-01-20T17:09:46.280Z","repository":{"id":175043609,"uuid":"653138188","full_name":"arrayfire/arrayfire-py","owner":"arrayfire","description":"Arrayfire python wrapper","archived":false,"fork":false,"pushed_at":"2025-09-04T22:23:12.000Z","size":396,"stargazers_count":0,"open_issues_count":10,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-05T00:19:21.267Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arrayfire.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-06-13T13:27:32.000Z","updated_at":"2025-09-04T22:23:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"fba3cd13-1353-4fdd-a531-f69dd9d2ba16","html_url":"https://github.com/arrayfire/arrayfire-py","commit_stats":null,"previous_names":["roaffix/arrayfire-py","arrayfire/arrayfire-py"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arrayfire/arrayfire-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arrayfire","download_url":"https://codeload.github.com/arrayfire/arrayfire-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arrayfire%2Farrayfire-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273806172,"owners_count":25171564,"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-05T02:00:09.113Z","response_time":402,"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":[],"created_at":"2025-09-05T19:09:20.102Z","updated_at":"2026-01-20T17:09:46.271Z","avatar_url":"https://github.com/arrayfire.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# arrayfire-py\n\u003cp align=\"center\"\u003e\u003ca href=\"http://arrayfire.com/\"\u003e\u003cimg src=\"http://arrayfire.com/logos/arrayfire_logo_whitebkgnd.png\" width=\"800\"\u003e\u003c/a\u003e\u003c/p\u003e\n\n[ArrayFire](https://github.com/arrayfire/arrayfire) is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific computing code that is portable across CUDA, OpenCL, oneAPI and CPU devices.  \n\nThis project is meant is meant to provide an easy to use Python interface for the ArrayFire C library, i.e, it provides array functionality, math operations, printing, etc. This is the front-end python library for using ArrayFire. It is currently supported on Python 3.10+.\n\nHere is an example of the library at work:\n```py\nimport arrayfire as af\n\n# Set any backend and device (optional: 'cuda', 'opencl', 'oneapi', 'cpu')\naf.set_backend(af.BackendType.cuda)\naf.set_device(0)\n\n# Monte Carlo estimation of pi\ndef calc_pi_device(samples):\n    # Simple, array based API\n    # Generate uniformly distributed random numers\n    x = af.randu(samples)\n    y = af.randu(samples)\n    # Supports Just In Time Compilation\n    # The following line generates a single kernel\n    within_unit_circle = (x * x + y * y) \u003c 1\n    # Intuitive function names\n    return 4 * af.count(within_unit_circle) / samples\n```\nFind out more in our [examples](https://github.com/arrayfire/arrayfire-py/tree/master/examples) directory or just read the [documentation](https://arrayfire.org/arrayfire-py/overview.html). \n\n# Prequisites and Installing\n\nThis project provides the python interface to ArrayFire, however it requires access to the ArrayFire binaries as a prequisite. The dependency chain can be separated into 3 different parts as follows:\n```\narrayfire-py -\u003e arrayfire-binary-python-wrapper -\u003e ArrayFire C Libraries\n```\nTo run arrayfire with python each of these parts is needed:\n- [`arrayfire-py`](https://github.com/arrayfire/arrayfire-python) is the ***intended User Interface*** that provides a numpy-like layer to execute math and array operations with ArrayFire.\n- [`arrayfire-binary-python-wrapper`](https://github.com/arrayfire/arrayfire-binary-python-wrapper) is a thin wrapper that provides Python direct access to the ArrayFire functions in the C library. This package must have access to ArrayFire binaries, either through a system-wide install, or through a pre-bundled wheel that includes binaries. \n- [`ArrayFire C Libraries`](https://github.com/arrayfire/arrayfire) are the binaries obtained from compiling the [ArrayFire C/C++ Project](https://github.com/arrayfire/arrayfire) or more simply by downloading [installers in the ArrayFire download page](https://arrayfire.com/download/). Binaries can also be obtained as part of a pre-packaged arrayfire-binary-python-wrapper wheel.\n\n**Install the python wrapper with existing ArrayFire install:**\n```sh\n# install required binary wrapper, assumes ArrayFire binaries will be installed on the system\npip install arrayfire-binary-python-wrapper\npip install arrayfire-py # install arrayfire python interface library\n```\n\n**Install wrapper with a pre-built wheel:**\n```sh\n# will grab a binary wrapper with included pre-built binaries\npip install arrayfire-binary-python-wrapper -f https://repo.arrayfire.com/python/wheels/3.10.0/ \npip install arrayfire-py\n```\n# Running Tests\n\nTests are located in folder [tests](tests).\n\nTo run the tests, use:\n```bash\npython -m pytest tests/\n```\n\n# Building\n```\npython -m pip install -r dev-requirements.txt\npython -m build --wheel\n```\n**Note: Building this project does not require the arrayfire-binary-python-wrapper package; however, the binary wrapper is needed to run any projects with it**\n\n## Experimental Array API support\nThis wrapper is exploring an experimental implementation of the [DataAPIs](https://data-apis.org) [array API](https://data-apis.org/array-api/latest) standard [in this directory](https://github.com/arrayfire/arrayfire-py/tree/master/arrayfire/array_api) with the goal of allowing ArrayFire to seamlessly interoperate with the broader Python landscape. Some portions of the standard are still unimplemented however some simpler examples are working. \n\n# Contributing\n\nIf you are interested in using ArrayFire through python, we would appreciate any feedback and contributions.\n\nThe community of ArrayFire developers invites you to build with us if you are\ninterested and able to write top-performing tensor functions. Together we can\nfulfill [The ArrayFire\nMission](https://github.com/arrayfire/arrayfire/wiki/The-ArrayFire-Mission-Statement)\nfor fast scientific computing for all.\n\nContributions of any kind are welcome! Please refer to [the\nwiki](https://github.com/arrayfire/arrayfire/wiki) and our [Code of\nConduct](33) to learn more about how you can get involved with the ArrayFire\nCommunity through\n[Sponsorship](https://github.com/arrayfire/arrayfire/wiki/Sponsorship),\n[Developer\nCommits](https://github.com/arrayfire/arrayfire/wiki/Contributing-Code-to-ArrayFire),\nor [Governance](https://github.com/arrayfire/arrayfire/wiki/Governance).\n\n# Citations and Acknowledgements\n\nIf you redistribute ArrayFire, please follow the terms established in [the\nlicense](LICENSE).\n\nArrayFire development is funded by AccelerEyes LLC and several third parties,\nplease see the list of [acknowledgements](ACKNOWLEDGEMENTS.md) for an\nexpression of our gratitude.\n\n# Support and Contact Info\n\n* [Slack Chat](https://join.slack.com/t/arrayfire-org/shared_invite/MjI4MjIzMDMzMTczLTE1MDI5ODg4NzYtN2QwNGE3ODA5OQ)\n* [Google Groups](https://groups.google.com/forum/#!forum/arrayfire-users)\n* ArrayFire Services:  [Consulting](http://arrayfire.com/consulting)  |  [Support](http://arrayfire.com/download)   |  [Training](http://arrayfire.com/training)\n\n# Trademark Policy\n\nThe literal mark \"ArrayFire\" and ArrayFire logos are trademarks of AccelerEyes\nLLC (dba ArrayFire). If you wish to use either of these marks in your own\nproject, please consult [ArrayFire's Trademark\nPolicy](http://arrayfire.com/trademark-policy/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrayfire%2Farrayfire-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farrayfire%2Farrayfire-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farrayfire%2Farrayfire-py/lists"}