{"id":37085208,"url":"https://github.com/monzelr/ndsharray","last_synced_at":"2026-01-14T10:28:26.519Z","repository":{"id":49327627,"uuid":"515477648","full_name":"monzelr/ndsharray","owner":"monzelr","description":"Sharing numpy ndarray with a simple interface between different (sub)processes","archived":false,"fork":false,"pushed_at":"2025-09-09T11:46:47.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-09T14:21:09.433Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monzelr.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":"2022-07-19T07:19:05.000Z","updated_at":"2025-09-09T11:15:26.000Z","dependencies_parsed_at":"2025-09-09T13:11:07.615Z","dependency_job_id":"a8003def-0a7f-4617-8a86-8f474ce08b5a","html_url":"https://github.com/monzelr/ndsharray","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/monzelr/ndsharray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzelr%2Fndsharray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzelr%2Fndsharray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzelr%2Fndsharray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzelr%2Fndsharray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monzelr","download_url":"https://codeload.github.com/monzelr/ndsharray/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monzelr%2Fndsharray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417238,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:25:19.714Z","status":"ssl_error","status_checked_at":"2026-01-14T10:22:49.371Z","response_time":107,"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":[],"created_at":"2026-01-14T10:28:25.939Z","updated_at":"2026-01-14T10:28:26.510Z","avatar_url":"https://github.com/monzelr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Overview\n========\nndarray + sharing = ndsharray\n\nIntroduction\n------------\nThis python module let you share a numpy ndarray within different processes (either via python's multiprocessing or \nsharing between different python instances). The library behind this package is the lib \n[mmap](https://docs.python.org/3/library/mmap.html) from official python - no extra library, except numpy, is needed. \nThe mmap approach is using the shared memory, which can be accessed by different CPUs/python instances. Using shared \nmemory is much \nfaster than the pickle approach - you can even do a video streaming on a Raspberry Pi / Jetson Nano over multiple \npython processes.\\\nThis library is easy-to-use, just initialize the shared array with a unique tag and write/read! You can even change the \nnumpy array dimension/shape/dtype during runtime - the mmap will be silently rebuild if there is a change in the \nnumpy array  size/shape/dtype.\n\nSmall Example Code:\n```python\nimport numpy as np\nfrom ndsharray import NdShArray\n    \nshared_array = NdShArray(\"my_unique_tag\", r_w='w')  # r_w must be specified\n\nmy_array = np.random.random((400, 800))\nshared_array.write(my_array)\n\nprint(my_array)\n```\n\nThat's all for writing into shared memory. How to read? Open a second python instance:\n```python\nimport numpy as np\nfrom ndsharray import NdShArray\n\nshared_array = NdShArray(\"my_unique_tag\", r_w='r')  # r_w must be specified\n\nstatus, my_array = shared_array.read()\n\nprint(my_array)\n```\n\nDocumentation\n-------------\nCan be found here: https://ndsharray.readthedocs.io/en/latest/\n\n\nRequirements\n------------ \n- Python ≥ 3.6\n- numpy\n\nTested with example codes on \n- Windows 10, amd64, Python 3.6 / 3.8\n- Ubuntu 20, amd64, Python 3.6 /3.8\n- NVIDIA Jetson Nano with Ubuntu 18.04, ARM64-bit (aarch64), Python 3.6\n\nSome technical notes\n--------------------\nThis library shall be an easy-to-use library and also shall be faster than pickling numpy arrays to another process. \nPlease note that the python's provided \n[shared_memory](https://docs.python.org/3/library/multiprocessing.shared_memory.html) does the same as ndsharray, but \nis using byte array instead of numpy array! However, shared_memory is available since python 3.8 and not \nsupported for python 3.6.\n\n\nInstallation from Github\n------------------------\nMake sure to have git, python and pip in your environment path or activate your python environment.\\\nTo install enter in cmd/shell:\n```console\ngit clone https://github.com/monzelr/ndsharray.git\n\ncd ndsharray\n\npip install .\n```\n\nAlternative with python:\n```console\npython setup.py install\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzelr%2Fndsharray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonzelr%2Fndsharray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonzelr%2Fndsharray/lists"}