Skip to content

Commit f6f24de

Browse files
authored
Fix example for initializing StructArray (#350)
Corrected the initialization example for StructArray.
1 parent 4a1e271 commit f6f24de

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ x = StructArray{Foo}((adata, bdata))
2222
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:
2323

2424
```@repl intro
25-
x = Array{Foo}((b = adata, a = bdata)) # initialize a with bdata and vice versa
25+
x = StructArray{Foo}((b = adata, a = bdata)) # initialize a with bdata and vice versa
2626
```
2727

2828
If a `struct` is not specified, a `StructArray` with `Tuple `or `NamedTuple` elements will be created:

0 commit comments

Comments
 (0)