- 2 4</code></pre><p>Converting to a named tuple from a labelled array x is available using <code>convert(NamedTuple, x)</code>. Furthermore, <code>pairs(x)</code> creates an iterator that is functionally the same as <code>pairs(convert(NamedTuple, x))</code>, yielding <code>:label => x.label</code> for each label of the array.</p><p>There are some crucial differences between a labelled array and a named tuple. Labelled arrays can have any dimensions, while named tuples are always 1D. A named tuple can have different types on each element, while an <code>SLArray</code> can only have one element type and furthermore it has the actions of a static vector. As a result <code>SLArray</code> has less element type information, which improves compilation speed while giving more vector functionality than a NamedTuple. <code>LArray</code> also only has a single element type and, unlike a named tuple, is mutable.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../LArrays/">« LArrays</a><a class="docs-footer-nextpage" href="../Note_labelled_slices/">Note: Labelled slices »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.10.0 on <span class="colophon-date" title="Monday 31 March 2025 21:58">Monday 31 March 2025</span>. Using Julia version 1.11.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments