{"id":19093710,"url":"https://github.com/juliaarrays/staticarrays.jl","last_synced_at":"2026-02-20T11:00:58.190Z","repository":{"id":38080978,"uuid":"58931685","full_name":"JuliaArrays/StaticArrays.jl","owner":"JuliaArrays","description":"Statically sized arrays for Julia","archived":false,"fork":false,"pushed_at":"2025-12-30T11:15:20.000Z","size":3746,"stargazers_count":820,"open_issues_count":221,"forks_count":153,"subscribers_count":13,"default_branch":"master","last_synced_at":"2026-01-01T08:32:57.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-05-16T12:45:37.000Z","updated_at":"2025-12-31T04:43:44.000Z","dependencies_parsed_at":"2024-01-12T18:14:25.120Z","dependency_job_id":"52e0c896-9a7a-43dd-96b2-be80b803a867","html_url":"https://github.com/JuliaArrays/StaticArrays.jl","commit_stats":{"total_commits":941,"total_committers":118,"mean_commits":7.97457627118644,"dds":0.8459086078639745,"last_synced_commit":"d80455d2e1aba57a6cf65cc8d787dc6474ec3980"},"previous_names":[],"tags_count":143,"template":false,"template_full_name":null,"purl":"pkg:github/JuliaArrays/StaticArrays.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FStaticArrays.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FStaticArrays.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FStaticArrays.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FStaticArrays.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JuliaArrays","download_url":"https://codeload.github.com/JuliaArrays/StaticArrays.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JuliaArrays%2FStaticArrays.jl/sbom","scorecard":{"id":75410,"data":{"date":"2025-08-11","repo":{"name":"github.com/JuliaArrays/StaticArrays.jl","commit":"e7c5e0162fe829f317b1d49aea7f192eb8c58eae"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":3,"reason":"3 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":8,"reason":"Found 26/29 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/Invalidations.yml:1","Warn: no topLevel permission defined: .github/workflows/TagBot.yml:1","Warn: no topLevel permission defined: .github/workflows/benchmark.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/Invalidations.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/Invalidations.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Invalidations.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/Invalidations.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Invalidations.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/Invalidations.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Invalidations.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/Invalidations.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/Invalidations.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/Invalidations.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Invalidations.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/Invalidations.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/Invalidations.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/Invalidations.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/TagBot.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/TagBot.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/benchmark.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/benchmark.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/benchmark.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/benchmark.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:96: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:81: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:89: update your workflow using https://app.stepsecurity.io/secureworkflow/JuliaArrays/StaticArrays.jl/ci.yml/master?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  12 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-15T04:41:57.825Z","repository_id":38080978,"created_at":"2025-08-15T04:41:57.825Z","updated_at":"2025-08-15T04:41:57.825Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29648421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T09:27:29.698Z","status":"ssl_error","status_checked_at":"2026-02-20T09:26:12.373Z","response_time":59,"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":[],"created_at":"2024-11-09T03:25:48.244Z","updated_at":"2026-02-20T11:00:57.982Z","avatar_url":"https://github.com/JuliaArrays.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StaticArrays\n\n*Statically sized arrays for Julia*\n\n[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaArrays.github.io/StaticArrays.jl/stable)\n[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaArrays.github.io/StaticArrays.jl/dev)\n[![Build Status](https://github.com/JuliaArrays/StaticArrays.jl/workflows/CI/badge.svg)](https://github.com/JuliaArrays/StaticArrays.jl/actions?query=workflow%3ACI)\n[![codecov.io](https://codecov.io/github/JuliaArrays/StaticArrays.jl/branch/master/graph/badge.svg)](http://codecov.io/github/JuliaArrays/StaticArrays.jl/branch/master)\n[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)\n[![deps](https://juliahub.com/docs/StaticArrays/deps.svg)](https://juliahub.com/ui/Packages/StaticArrays/yY9vm?t=2)\n[![version](https://juliahub.com/docs/StaticArrays/version.svg)](https://juliahub.com/ui/Packages/StaticArrays/yY9vm)\n\n\n**StaticArrays** provides a framework for implementing statically sized arrays\nin Julia, using the abstract type `StaticArray{Size,T,N} \u003c: AbstractArray{T,N}`.\nSubtypes of `StaticArray` will provide fast implementations of common array and\nlinear algebra operations. Note that here \"statically sized\" means that the\nsize can be determined from the *type*, and \"static\" does **not** necessarily\nimply `immutable`.\n\nThe package also provides some concrete static array types: `SVector`, `SMatrix`\nand `SArray`, which may be used as-is (or else embedded in your own type).\nMutable versions `MVector`, `MMatrix` and `MArray` are also exported, as well\nas `SizedArray` for annotating standard `Array`s with static size information.\nFurther, the abstract `FieldVector` can be used to make fast `StaticVector`s\nout of any uniform Julia \"struct\".\nFull documentation can be found [here](https://JuliaArrays.github.io/StaticArrays.jl/stable/).\n\nMost of the primary array types exported by StaticArrays.jl are defined in the small interface\npackage [StaticArraysCore.jl](https://github.com/JuliaArrays/StaticArraysCore.jl). This includes\ne.g., the definitions of the abstract type `StaticArray` and the concrete types `SArray`,\n`MArray`, and `SizedArray` (as well as their dimension-specific aliases).\nThis enables downstream packages to implement new methods for these types without depending\non (and hence loading) the entirety of StaticArrays.jl, and thereby to avoid incurring the full\nload-time of StaticArrays.jl (which is on the order of 0.6 s for StaticArrays.jl v1.4 on Julia\nv1.7).\n\n## Speed\n\nThe speed of *small* `SVector`s, `SMatrix`s and `SArray`s is often \u003e 10 × faster\nthan `Base.Array`. For example, here's a\n[microbenchmark](perf/README_benchmarks.jl) showing some common operations.\n\n```\n============================================\n    Benchmarks for 3×3 Float64 matrices\n============================================\nMatrix multiplication               -\u003e 5.9x speedup\nMatrix multiplication (mutating)    -\u003e 1.8x speedup\nMatrix addition                     -\u003e 33.1x speedup\nMatrix addition (mutating)          -\u003e 2.5x speedup\nMatrix determinant                  -\u003e 112.9x speedup\nMatrix inverse                      -\u003e 67.8x speedup\nMatrix symmetric eigendecomposition -\u003e 25.0x speedup\nMatrix Cholesky decomposition       -\u003e 8.8x speedup\nMatrix LU decomposition             -\u003e 6.1x speedup\nMatrix QR decomposition             -\u003e 65.0x speedup\n```\n\nThese numbers were generated on an Intel i7-7700HQ using Julia-1.2. As with all\nsynthetic benchmarks, the speedups you see here should only be taken as very\nroughly indicative of the speedup you may see in real code. When in doubt,\nbenchmark your real application!\n\nNote that in the current implementation, working with large `StaticArray`s puts a\nlot of stress on the compiler, and becomes slower than `Base.Array` as the size\nincreases.  A very rough rule of thumb is that you should consider using a\nnormal `Array` for arrays larger than 100 elements.\n\n\n## Quick start\n\nAdd *StaticArrays* from the [Pkg REPL](https://docs.julialang.org/en/latest/stdlib/Pkg/#Getting-Started-1), i.e., `pkg\u003e add StaticArrays`. Then:\n```julia\nusing LinearAlgebra\nusing StaticArrays\n\n# Use the convenience constructor type `SA` to create vectors and matrices\nSA[1, 2, 3]      isa SVector{3,Int}\nSA_F64[1, 2, 3]  isa SVector{3,Float64}\nSA_F32[1, 2, 3]  isa SVector{3,Float32}\nSA[1 2; 3 4]     isa SMatrix{2,2,Int}\nSA_F64[1 2; 3 4] isa SMatrix{2,2,Float64}\n\n# Create an SVector using various forms, using constructors, functions or macros\nv1 = SVector(1, 2, 3)\nv1.data === (1, 2, 3) # SVector uses a tuple for internal storage\nv2 = SVector{3,Float64}(1, 2, 3) # length 3, eltype Float64\nv3 = @SVector [1, 2, 3]\nv4 = @SVector [i^2 for i = 1:10] # arbitrary comprehensions (range is evaluated at global scope)\nv5 = zeros(SVector{3}) # defaults to Float64\nv6 = @SVector zeros(3)\nv7 = SVector{3}([1, 2, 3]) # Array conversions must specify size\n\n# Can get size() from instance or type\nsize(v1) == (3,)\nsize(typeof(v1)) == (3,)\n\n# Similar constructor syntax for matrices\nm1 = SMatrix{2,2}(1, 2, 3, 4) # flat, column-major storage, equal to m2:\nm2 = @SMatrix [ 1  3 ;\n                2  4 ]\nm3 = SMatrix{3,3}(1I)\nm4 = @SMatrix randn(4,4)\nm5 = SMatrix{2,2}([1 3 ; 2 4]) # Array conversions must specify size\n\n# Higher-dimensional support\na = @SArray randn(2, 2, 2, 2, 2, 2)\n\n# Supports all the common operations of AbstractArray\nv7 = v1 + v2\nv8 = sin.(v3)\nv3 == m3 * v3 # recall that m3 = SMatrix{3,3}(1I)\n# map, reduce, broadcast, map!, broadcast!, etc...\n\n# Indexing can also be done using static arrays of integers\nv1[1] === 1\nv1[SVector(3,2,1)] === @SVector [3, 2, 1]\nv1[:] === v1\ntypeof(v1[[1,2,3]]) \u003c: Vector # Can't determine size from the type of [1,2,3]\n\n# Is (partially) hooked into BLAS, LAPACK, etc:\nrand(MMatrix{20,20}) * rand(MMatrix{20,20}) # large matrices can use BLAS\neigen(m3) # eigen(), etc uses specialized algorithms up to 3×3, or else LAPACK\n\n# Static arrays stay statically sized, even when used by Base functions, etc:\ntypeof(eigen(m3).vectors) == SMatrix{3,3,Float64,9}\ntypeof(eigen(m3).values) == SVector{3,Float64}\n\n# similar() returns a mutable container, while similar_type() returns a constructor:\ntypeof(similar(m3)) == MArray{Tuple{3,3},Int64,2,9} # (final parameter is length = 9)\nsimilar_type(m3) == SArray{Tuple{3,3},Int64,2,9}\n\n# The Size trait is a compile-time constant representing the size\nSize(m3) === Size(3,3)\n\n# A standard Array can be wrapped into a SizedArray\nm4 = SizedMatrix{3,3}(rand(3,3))\ninv(m4) # Take advantage of specialized fast methods\n\n# reshape() uses Size() or types to specify size:\nreshape([1,2,3,4], Size(2,2)) == @SMatrix [ 1  3 ;\n                                            2  4 ]\ntypeof(reshape([1,2,3,4], Size(2,2))) === SizedArray{Tuple{2, 2},Int64,2,1}\n\n```\n\n## Approach\n\nThe package provides a range of different useful built-in `StaticArray` types,\nwhich include mutable and immutable arrays based upon tuples, arrays based upon\nstructs, and wrappers of `Array`. There is a relatively simple interface for\ncreating your own, custom `StaticArray` types, too.\n\nThis package also provides methods for a wide range of `AbstractArray` functions,\nspecialized for (potentially immutable) `StaticArray`s. Many of Julia's\nbuilt-in method definitions inherently assume mutability, and further\nperformance optimizations may be made when the size of the array is known to the\ncompiler. One example of this is by loop unrolling, which has a substantial\neffect on small arrays and tends to automatically trigger LLVM's SIMD\noptimizations. Another way performance is boosted is by providing specialized\nmethods for `det`, `inv`, `eigen` and `cholesky` where the algorithm depends on the\nprecise dimensions of the input. In combination with intelligent fallbacks to\nthe methods in Base, we seek to provide a comprehensive support for statically\nsized arrays, large or small, that hopefully \"just works\".\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaarrays%2Fstaticarrays.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuliaarrays%2Fstaticarrays.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuliaarrays%2Fstaticarrays.jl/lists"}