From 18084c0422ea6dcb92eb02af6755de682c09ea13 Mon Sep 17 00:00:00 2001 From: "Lance (Weiqing) Xu" <47257262+lanceXwq@users.noreply.github.com> Date: Fri, 10 Apr 2026 13:52:08 +0200 Subject: [PATCH] Fix example for initializing StructArray Corrected the initialization example for StructArray. --- docs/src/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index 26d5f56..13e037d 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -22,7 +22,7 @@ x = StructArray{Foo}((adata, bdata)) You can also initialize a `StructArray` by passing in a `NamedTuple`, in which case the name (rather than the order) specifies how the input arrays are assigned to fields: ```@repl intro -x = Array{Foo}((b = adata, a = bdata)) # initialize a with bdata and vice versa +x = StructArray{Foo}((b = adata, a = bdata)) # initialize a with bdata and vice versa ``` If a `struct` is not specified, a `StructArray` with `Tuple `or `NamedTuple` elements will be created: