{"id":23611127,"url":"https://github.com/emmt/wrappedarrays.jl","last_synced_at":"2026-02-09T13:32:20.083Z","repository":{"id":269271286,"uuid":"906742012","full_name":"emmt/WrappedArrays.jl","owner":"emmt","description":"Arrays built on other storage objects","archived":false,"fork":false,"pushed_at":"2025-11-24T10:30:27.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T23:00:11.049Z","etag":null,"topics":["arrays","julia"],"latest_commit_sha":null,"homepage":"","language":"Julia","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/emmt.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,"zenodo":null}},"created_at":"2024-12-21T19:11:07.000Z","updated_at":"2025-11-24T10:30:25.000Z","dependencies_parsed_at":"2024-12-22T10:30:32.055Z","dependency_job_id":"2bd54792-1508-4deb-ac5b-e13e5a5a272e","html_url":"https://github.com/emmt/WrappedArrays.jl","commit_stats":null,"previous_names":["emmt/wrappedarrays.jl"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/emmt/WrappedArrays.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2FWrappedArrays.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2FWrappedArrays.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2FWrappedArrays.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2FWrappedArrays.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emmt","download_url":"https://codeload.github.com/emmt/WrappedArrays.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emmt%2FWrappedArrays.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29266958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T12:53:16.161Z","status":"ssl_error","status_checked_at":"2026-02-09T12:52:30.244Z","response_time":56,"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":["arrays","julia"],"created_at":"2024-12-27T16:13:16.700Z","updated_at":"2026-02-09T13:32:20.051Z","avatar_url":"https://github.com/emmt.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WrappedArrays\n\n*Arrays built on other storage objects*\n\n[![Build Status](https://github.com/emmt/WrappedArrays.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/emmt/WrappedArrays.jl/actions/workflows/CI.yml?query=branch%3Amain) [![Build Status](https://ci.appveyor.com/api/projects/status/github/emmt/WrappedArrays.jl?svg=true)](https://ci.appveyor.com/project/emmt/WrappedArrays-jl) [![Coverage](https://codecov.io/gh/emmt/WrappedArrays.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/emmt/WrappedArrays.jl)\n\n`WrappedArrays` is a [Julia](https://julialang.org/) package to build dense arrays (i.e.\nwith contiguous elements) whose elements are stored in another object. This generalizes\nthe principle of [`StaticArrays`](https://github.com/JuliaArrays/StaticArrays.jl) which\nwrap small arrays over tuples of values.\n\nA wrapped array is typically built by:\n\n``` julia\nA = WrappedArray{T}(obj, inds...; offset=0)\n```\n\nwhich yields a dense array `A` using object `obj` for backing the storage of the elements\nof `A`. Parameter `T` is the type of the elements of `A`. Arguments `inds...` specify the\nshape of `A`, each of `inds...` is a dimension length or an index range. The shape of `A`\nmay also be specified as a tuple. Keyword `offset` is the number of bytes between the\nfirst element of `A` and the base address of `obj` or the address of the first element of\n`obj` if it is an array.\n\nThe constructor may also be called as `WrappedArray{T,N}(...)` with `N` the number of\ndimensions which is usually omitted as it can be inferred from the given array shape.\n\n`WrappedVector{T}` and `WrappedMatrix{T}` are aliases for `WrappedArray{T,N}` with `N`\nequal to `1` and `2` respectively.\n\nA wrapped vector with as much elements of type `T` as can be stored by `obj` (minus\n`offset` bytes if this keyword is specified) can be created with:\n\n``` julia\nA = WrappedVector{T}(obj, :)\n```\n\nExample:\n\n``` julia\nmutable struct NamedData{T,L}\n    name::Symbol\n    data::NTuple{L,T}\n    serial::UInt\nend\ndata_eltype(B::NamedData{T,L}) where {T,L} = T\ndata_length(B::NamedData{T,L}) where {T,L} = L\nB = NamedData(:someName, (1.0, 0.0, 11.7, -2.4), UInt(0x796));\nA = WrappedArray{data_eltype(B)}(B, data_length(B), offset=fieldoffset(typeof(B), 2));\n```\n\nbuilds a wrapped array `A` over the entries of the `data` member of object `B`. These\nentries are then accessible for reading, with the syntax `A[i]`, or writing, , with the\nsyntax `A[i] = x`, and with the same speed and safety (i.e., bound checking) as for\nregular arrays. Array `A` may also be passed to `ccall` or `@ccall` for calling a\nC-function in a shared library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmt%2Fwrappedarrays.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femmt%2Fwrappedarrays.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femmt%2Fwrappedarrays.jl/lists"}