From 57c03dfec3b77120ef05d8e034bece2bdf6dcd95 Mon Sep 17 00:00:00 2001 From: BO ZHANG Date: Sat, 28 Oct 2023 12:25:04 +0800 Subject: [PATCH] fix docstring --- csst_proto/config.py | 3 ++- csst_proto/flip_image.py | 3 ++- csst_proto/flip_image_in_parallel.py | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/csst_proto/config.py b/csst_proto/config.py index 1647448..e33cf90 100644 --- a/csst_proto/config.py +++ b/csst_proto/config.py @@ -25,7 +25,8 @@ HERE: str = os.path.dirname(__file__) # 当config_path被指定时,会读取指定的config_path # 当config_path=None时,读取随包数据中的config/default_config.toml def read_config(config_path: Optional[str] = None): - """Get config info from a toml file. + """ + Get config info from a toml file. Read a `toml` format config file. If `config_path` is specified, read that config. diff --git a/csst_proto/flip_image.py b/csst_proto/flip_image.py index ef5014e..a95d4a3 100644 --- a/csst_proto/flip_image.py +++ b/csst_proto/flip_image.py @@ -62,7 +62,8 @@ def flip_image(image: np.ndarray, use_numpy: bool = False) -> np.ndarray: # 此函数读取了随包数据中的test_image.txt def read_default_image(): - """Read default image. + """ + Read default image. This function reads the default image associated with this package. diff --git a/csst_proto/flip_image_in_parallel.py b/csst_proto/flip_image_in_parallel.py index b466e3b..dc35acb 100644 --- a/csst_proto/flip_image_in_parallel.py +++ b/csst_proto/flip_image_in_parallel.py @@ -16,7 +16,8 @@ from .flip_image import flip_image def flip_multiple_images_mp(images: list[np.ndarray], n_jobs: int) -> list[np.ndarray]: - """Flip input images in parallel. + """ + Flip input images in parallel. Flip images in parallel with `multiprocessing`. @@ -37,7 +38,8 @@ def flip_multiple_images_mp(images: list[np.ndarray], n_jobs: int) -> list[np.nd def flip_multiple_images_jl(images: list[np.ndarray], n_jobs: int) -> list[np.ndarray]: - """Flip input images in parallel. + """ + Flip input images in parallel. Flip images in parallel with `joblib`. -- GitLab