mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 14:50:25 +01:00
docs: explanation of json.gz example slightly extended.
This commit is contained in:
parent
350ccc083e
commit
e435907a07
1 changed files with 2 additions and 1 deletions
|
@ -384,13 +384,14 @@ my_obs.tag = "My observable"
|
|||
|
||||
pe.input.json.dump_to_json(my_obs, "test_output_file", description="This file contains a test observable")
|
||||
# For a single observable one can equivalently use the class method dump
|
||||
my_obs.dump("test_output", description="This file contains a test observable")
|
||||
my_obs.dump("test_output_file", description="This file contains a test observable")
|
||||
|
||||
check = pe.input.json.load_json("test_output_file")
|
||||
|
||||
print(my_obs == check)
|
||||
> True
|
||||
```
|
||||
The format also allows to directly write out the content of `Corr` objects or lists and arrays of `Obs` objects by passing the desired data to `pyerrors.input.json.dump_to_json`.
|
||||
|
||||
## json.gz format specification
|
||||
The first entries of the file provide optional auxiliary information:
|
||||
|
|
Loading…
Add table
Reference in a new issue