fix: cli show stat failed for single values
This commit is contained in:
parent
373f3476c0
commit
b2ac8939a3
1 changed files with 5 additions and 2 deletions
|
|
@ -9,6 +9,7 @@ from .main import update_aliases
|
|||
from .meas_io import drop_cache as mio_drop_cache
|
||||
from .meas_io import load_record as mio_load_record
|
||||
import os
|
||||
from pyerrors import Corr
|
||||
from importlib.metadata import version
|
||||
|
||||
|
||||
|
|
@ -120,12 +121,14 @@ def stat(
|
|||
"--dataset",
|
||||
"-d",
|
||||
),
|
||||
record: str = typer.Argument(),
|
||||
record_id: str = typer.Argument(),
|
||||
) -> None:
|
||||
"""
|
||||
Show the statistics of a given record.
|
||||
"""
|
||||
record = mio_load_record(path, record)[0]
|
||||
record = mio_load_record(path, record_id)
|
||||
if isinstance(record, Corr):
|
||||
record = record[0]
|
||||
statistics = record.idl
|
||||
print(statistics)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue