{"id":46785663,"url":"https://github.com/34j/numpy-flint-arb","last_synced_at":"2026-03-10T01:33:24.607Z","repository":{"id":328117203,"uuid":"1114274313","full_name":"34j/numpy-flint-arb","owner":"34j","description":"Arbitrary precision floating / ball arithmetic (interval arithmetic) dtype in NumPy / array API","archived":false,"fork":false,"pushed_at":"2026-02-28T11:23:02.000Z","size":221,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-28T15:07:16.805Z","etag":null,"topics":["acb","arb","arbitrary-precision","array-api","flint","interval-arithmetic","mpmath","numpy"],"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-12-11T06:24:04.000Z","updated_at":"2026-02-28T11:26:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/34j/numpy-flint-arb","commit_stats":null,"previous_names":["34j/numpy-flint-arb"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/34j/numpy-flint-arb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fnumpy-flint-arb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fnumpy-flint-arb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fnumpy-flint-arb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fnumpy-flint-arb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/34j","download_url":"https://codeload.github.com/34j/numpy-flint-arb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/34j%2Fnumpy-flint-arb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30320889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["acb","arb","arbitrary-precision","array-api","flint","interval-arithmetic","mpmath","numpy"],"created_at":"2026-03-10T01:33:23.991Z","updated_at":"2026-03-10T01:33:24.583Z","avatar_url":"https://github.com/34j.png","language":"Python","funding_links":["https://github.com/sponsors/34j"],"categories":[],"sub_categories":[],"readme":"# numpy-flint-arb\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/34j/numpy-flint-arb/actions/workflows/ci.yml?query=branch%3Amain\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/34j/numpy-flint-arb/ci.yml?branch=main\u0026label=CI\u0026logo=github\u0026style=flat-square\" alt=\"CI Status\" \u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://numpy-flint-arb.readthedocs.io\"\u003e\n    \u003cimg src=\"https://img.shields.io/readthedocs/numpy-flint-arb.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/numpy-flint-arb\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/34j/numpy-flint-arb.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/numpy-flint-arb/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/numpy-flint-arb.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/numpy-flint-arb.svg?style=flat-square\u0026logo=python\u0026amp;logoColor=fff\" alt=\"Supported Python versions\"\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/l/numpy-flint-arb.svg?style=flat-square\" alt=\"License\"\u003e\n\u003c/p\u003e\n\n---\n\n**Documentation**: \u003ca href=\"https://numpy-flint-arb.readthedocs.io\" target=\"_blank\"\u003ehttps://numpy-flint-arb.readthedocs.io \u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/34j/numpy-flint-arb\" target=\"_blank\"\u003ehttps://github.com/34j/numpy-flint-arb \u003c/a\u003e\n\n---\n\nArbitrary precision ball arithmetic (interval arithmetic) dtype in NumPy\n\n## Installation\n\nInstall this via pip (or your favourite package manager):\n\n```shell\npip install numpy-flint-arb\n```\n\n## Usage\n\nImport `numpy_flint_arb.np` instead of `numpy`:\n\n```python\nA = np.random.normal(size=(2, 2))\nb = np.random.normal(size=(2,))\nx = np.linalg.solve(A, b)\nb_approx = A @ x\nassert np.all(np.contains(b_approx, b))\n```\n\n## What it does\n\n- This package adds a `flarray` which [subclasses `ndarray`](https://numpy.org/doc/stable/user/basics.subclassing.html) in order to\n  - Override `__array_namespace__` to `numpy_flint_arb.np`\n  - Override `dtype` to return newly added `_fl_dtype` private attribute, since the actual internal dtype `object` cannot be overridden.\n  - Override `__array_finalize__` as recommended by the NumPy docs to return `flarray` with proper `_fl_dtype` instead of `ndarray` after Numpy operations.\n- Partially supports `linalg` and `(scipy.)special` functions.\n- Adds `tomat()` and `frommat()` to treat `flarray` as array of `arb_mat` / `acb_mat`, so that we can perform matrix operations like `np.linalg.solve` on `flarray`.\n- Does not perform any parallelization to avoid complexity and to fully utilize the great `python-flint` library\n  - Using `arb_series` and `acb_series` may be faster for additions but this is too hacky.\n  - Defining custom `dtype` is way too complicated\n  - Writing C extension would be theoretically also possible but is still too complicated.\n- Does not support `in` operator since it tries to convert the return value to bool. Use newly added `np.contains(x, y)` and `np.overlaps(x, y)` instead.\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!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/34j\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/55338215?v=4?s=80\" width=\"80px;\" alt=\"34j\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003e34j\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/34j/numpy-flint-arb/commits?author=34j\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"#ideas-34j\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"https://github.com/34j/numpy-flint-arb/commits?author=34j\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F34j%2Fnumpy-flint-arb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F34j%2Fnumpy-flint-arb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F34j%2Fnumpy-flint-arb/lists"}