Skip to content

Commit b9714ab

Browse files
Merge pull request #2073 from CliMA/ck/docs
Add more docs to `rcompare`
2 parents 36837c2 + 9620799 commit b9714ab

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/Fields/fieldvector.jl

+9-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,15 @@ end
497497
Recursively compare given fieldvectors via `==`.
498498
Returns `true` if `x == y` recursively.
499499
500-
FieldVectors with different types are considered different.
500+
The keyword `strict = true` allows users to additionally
501+
check that the types match. If `strict = false`, then
502+
`rcompare` will return `true` for `FieldVector`s and
503+
`NamedTuple`s with the same properties but permuted order.
504+
For example:
505+
506+
- `rcompare((;a=1,b=2), (;b=2,a=1); strict = true)` will return `false` and
507+
- `rcompare((;a=1,b=2), (;b=2,a=1); strict = false)` will return `true`
508+
501509
"""
502510
rcompare(
503511
x::T,

0 commit comments

Comments
 (0)