Skip to content

Commit 2b9b5b1

Browse files
fix docs
1 parent 54ab41f commit 2b9b5b1

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

docs/src/gnngraph.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,9 @@ false
7373
## Data Features
7474

7575
One or more arrays can be associated to nodes, edges, and (sub)graphs of a `GNNGraph`.
76-
They will be stored in the fields `g.ndata`, `g.edata`, and `g.gdata` respectivaly.
76+
They will be stored in the fields `g.ndata`, `g.edata`, and `g.gdata` respectively.
7777

78-
The data fields are [`DataStore`](@ref) objects, and conveniently
79-
offer an interface similar to both dictionaries and named tuples.
80-
Datastores support addition of new features after creation time.
78+
The data fields are [`DataStore`](@ref) objects. [`DataStore`](@ref)s conveniently offer an interface similar to both dictionaries and named tuples. Similarly to dictionaries, DataStores support addition of new features after creation time.
8179

8280
The array contained in the datastores have last dimension equal to `num_nodes` (in `ndata`), `num_edges` (in `edata`), or `num_graphs` (in `gdata`) respectively.
8381

@@ -158,7 +156,7 @@ and where the original graphs are disjoint subgraphs.
158156

159157
```julia
160158
using Flux
161-
using Flux.Data: DataLoader
159+
using Flux: DataLoader
162160

163161
data = [rand_graph(10, 30, ndata=rand(Float32, 3, 10)) for _ in 1:160]
164162
gall = Flux.batch(data)

src/GNNGraphs/datastore.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
""""
1+
"""
22
DataStore([n, data])
33
DataStore([n,] k1 = x1, k2 = x2, ...)
44
5-
A container for data, with optional metadata `n` enforcing
6-
`numobs(x) == n` for each feature array contained in the data store.
5+
A container for feature arrays. The optional argument `n` enforces that
6+
`numobs(x) == n` for each array contained in the datastore.
77
8-
At construction time, the data can be provided as any iterables of pairs
8+
At construction time, the `data` can be provided as any iterables of pairs
99
of symbols and arrays or as keyword arguments:
1010
1111
```julia-repl
@@ -32,8 +32,8 @@ DataStore() with 2 elements:
3232
x = 2×3 Matrix{Float64}
3333
```
3434
35-
The `DataStore` as an interface similar to both dictionaries and named tuples.
36-
Data can be accessed and added using either the indexing or the property syntax:
35+
The `DataStore` has an interface similar to both dictionaries and named tuples.
36+
Arrays can be accessed and added using either the indexing or the property syntax:
3737
3838
```julia-repl
3939
julia> ds = DataStore(x = ones(2, 3), y = zeros(3))
@@ -58,7 +58,7 @@ using `keys(ds)` and `values(ds)`. `map(f, ds)` applies the function `f`
5858
to each feature array:
5959
6060
```julia-repl
61-
julia> ds = DataStore(a=zeros(2), b=zeros(2));
61+
julia> ds = DataStore(a = zeros(2), b = zeros(2));
6262
6363
julia> ds2 = map(x -> x .+ 1, ds)
6464

src/GNNGraphs/gnngraph.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ A type representing a graph structure that also stores
2121
feature arrays associated to nodes, edges, and the graph itself.
2222
2323
The feature arrays are stored in the fields `ndata`, `edata`, and `gdata`
24-
as [`DataStore`](@ref) objects offering a convenient dictionary-like
25-
and named tuple like interface. The features can be passed at construction
24+
as [`DataStore`](@ref) objects offering a convenient dictionary-like
25+
and namedtuple-like interface. The features can be passed at construction
2626
time or added later.
2727
2828
A `GNNGraph` can be constructed out of different `data` objects

0 commit comments

Comments
 (0)