Skip to content

Commit

Permalink
docs: fixed doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmandlik committed Nov 26, 2024
1 parent 9758e07 commit 04841dc
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/extractors/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ArrayExtractor
╰── CategoricalExtractor(n=4)
julia> e([2, 3, 1, 4])
BagNode 1 obs, 64 bytes
╰── ArrayNode(4×4 OneHotArray with Bool elements) 4 obs, 72 bytes
BagNode 1 obs
╰── ArrayNode(4×4 OneHotArray with Bool elements) 4 obs
```
"""
struct ArrayExtractor{T} <: Extractor
Expand Down
6 changes: 3 additions & 3 deletions src/extractors/dict.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ DictExtractor
╰── b: CategoricalExtractor(n=6)
julia> e(Dict("a" => 1, "b" => 1))
ProductNode 1 obs, 0 bytes
├── a: ArrayNode(1×1 Array with Float32 elements) 1 obs, 60 bytes
╰── b: ArrayNode(6×1 OneHotArray with Bool elements) 1 obs, 60 bytes
ProductNode 1 obs
├── a: ArrayNode(1×1 Array with Float32 elements) 1 obs
╰── b: ArrayNode(6×1 OneHotArray with Bool elements) 1 obs
```
"""
struct DictExtractor{T <: NamedTuple} <: Extractor
Expand Down
12 changes: 6 additions & 6 deletions src/extractors/extractor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ ERROR: IncompatibleExtractor at path [:b]: This extractor does not support missi
[...]
julia> e_stable(Dict("a" => 0))
ProductNode 1 obs, 0 bytes
├── a: ArrayNode(1×1 Array with Union{Missing, Float32} elements) 1 obs, 62 bytes
╰── b: ArrayNode(6×1 MaybeHotMatrix with Union{Missing, Bool} elements) 1 obs, 62 bytes
ProductNode 1 obs
├── a: ArrayNode(1×1 Array with Union{Missing, Float32} elements) 1 obs
╰── b: ArrayNode(6×1 MaybeHotMatrix with Union{Missing, Bool} elements) 1 obs
```
See also: [`suggestextractor`](@ref), [`extract`](@ref).
Expand Down Expand Up @@ -233,9 +233,9 @@ DictExtractor
╰── b: CategoricalExtractor(n=2)
julia> e(sample)
ProductNode 1 obs, 0 bytes
├── a: ArrayNode(2×1 OneHotArray with Bool elements) 1 obs, 60 bytes
╰── b: ArrayNode(2×1 OneHotArray with Bool elements) 1 obs, 60 bytes
ProductNode 1 obs
├── a: ArrayNode(2×1 OneHotArray with Bool elements) 1 obs
╰── b: ArrayNode(2×1 OneHotArray with Bool elements) 1 obs
julia> e(sample) == extract(e, [sample])
true
Expand Down
12 changes: 6 additions & 6 deletions src/extractors/polymorph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ PolymorphExtractor
╰── CategoricalExtractor(n=4)
julia> e("tcp")
ProductNode 1 obs, 0 bytes
├── ArrayNode(2053×1 NGramMatrix with Int64 elements) 1 obs, 91 bytes
╰── ArrayNode(4×1 OneHotArray with Bool elements) 1 obs, 60 bytes
ProductNode 1 obs
├── ArrayNode(2053×1 NGramMatrix with Int64 elements) 1 obs
╰── ArrayNode(4×1 OneHotArray with Bool elements) 1 obs
julia> e("http")
ProductNode 1 obs, 0 bytes
├── ArrayNode(2053×1 NGramMatrix with Int64 elements) 1 obs, 92 bytes
╰── ArrayNode(4×1 OneHotArray with Bool elements) 1 obs, 60 bytes
ProductNode 1 obs
├── ArrayNode(2053×1 NGramMatrix with Int64 elements) 1 obs
╰── ArrayNode(4×1 OneHotArray with Bool elements) 1 obs
```
"""
struct PolymorphExtractor{T <: Union{NamedTuple, Tuple}} <: Extractor
Expand Down

0 comments on commit 04841dc

Please sign in to comment.