{"id":19093687,"url":"https://github.com/juliaarrays/readonlyarrays.jl","last_synced_at":"2026-05-25T19:30:19.783Z","repository":{"id":44902117,"uuid":"166662733","full_name":"JuliaArrays/ReadOnlyArrays.jl","owner":"JuliaArrays","description":"A wrapper type around AbstractArray that is read-only","archived":false,"fork":false,"pushed_at":"2024-04-10T12:14:10.000Z","size":22,"stargazers_count":31,"open_issues_count":4,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-09T12:35:10.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JuliaArrays.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2019-01-20T13:10:50.000Z","updated_at":"2025-02-05T14:48:57.000Z","dependencies_parsed_at":"2024-11-09T03:27:25.707Z","dependency_job_id":"0eba0b29-ca38-4f84-810b-97a1d62c669d","html_url":"https://github.com/JuliaArrays/ReadOnlyArrays.jl","commit_stats":{"total_commits":17,"total_committers":4,"mean_commits":4.25,"dds":"0.47058823529411764","last_synced_commit":"1f4ae3a2c6b389569cbebaecc42272cd1fc84396"},"previous_names":["juliaarrays/readonlyarrays.jl","bkamins/readonlyarrays.jl"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FReadOnlyArrays.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FReadOnlyArrays.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FReadOnlyArrays.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FReadOnlyArrays.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaArrays","download_url":"https://codeload.github.com/JuliaArrays/ReadOnlyArrays.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240142861,"owners_count":19754639,"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","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":"2024-11-09T03:25:42.986Z","updated_at":"2026-05-25T19:30:19.720Z","avatar_url":"https://github.com/JuliaArrays.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"ReadOnlyArrays.jl\n=============\n\nThis small package provides the `ReadOnlyArray` type, which wraps any `AbstractArray` and reimplements the array inferface without the setindex! function. The array can be used in all the usually ways but its elements cannot be modified. Attempting to set an element's value will raise an error. This functionality can be used to protect arrays that are intended to have unchanged values from unintended changes.\n\nA `ReadOnlyArray` is not a `StaticArray` from [`StaticArrays.jl`](https://github.com/JuliaArrays/StaticArrays.jl). Static arrays are statically sized and also usually immutable, but are intended to accelerate common operations on *small* arrays. A `ReadOnlyArray` wraps arrays of any size and does not reimplement any functionality except the usual [array interface](https://docs.julialang.org/en/v1/manual/interfaces/#man-interface-array).\n\nFor convenience, there are also `ReadOnlyVector` and `ReadOnlyMatrix` aliases available.\n\n### Installation\n\nIn the Julia REPL:\n\n```julia\nusing Pkg\nPkg.add(\"ReadOnlyArrays\")\n```\n\nor use package management mode by pressing `]` and entering `add ReadOnlyArrays`.\n\n### Usage\n\nWrap any array by contructing a read-only version.\n```julia\nusing ReadOnlyArrays\n\nx = [1.0, 2.0, 3.0]\nx = ReadOnlyArray(x)\n```\nThe elements of this array cannot be modified. Attempting to set element values\n```julia\nx[1] = 2.0\n```\nwill raise an error\n```\nERROR: CanonicalIndexError: setindex! not defined for ReadOnlyVector{Float64, Vector{Float64}}\n```\nThis read only array also identifies as a read only vector, for convenience.\n```julia\ntypeof(y) \u003c: ReadOnlyVector\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaarrays%2Freadonlyarrays.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaarrays%2Freadonlyarrays.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaarrays%2Freadonlyarrays.jl/lists"}