Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-pipeline
csst_proto
Commits
57c03dfe
Commit
57c03dfe
authored
Oct 28, 2023
by
BO ZHANG
🏀
Browse files
fix docstring
parent
3e1b3ea1
Changes
3
Hide whitespace changes
Inline
Side-by-side
csst_proto/config.py
View file @
57c03dfe
...
@@ -25,7 +25,8 @@ HERE: str = os.path.dirname(__file__)
...
@@ -25,7 +25,8 @@ HERE: str = os.path.dirname(__file__)
# 当config_path被指定时,会读取指定的config_path
# 当config_path被指定时,会读取指定的config_path
# 当config_path=None时,读取随包数据中的config/default_config.toml
# 当config_path=None时,读取随包数据中的config/default_config.toml
def
read_config
(
config_path
:
Optional
[
str
]
=
None
):
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.
Read a `toml` format config file.
If `config_path` is specified, read that config.
If `config_path` is specified, read that config.
...
...
csst_proto/flip_image.py
View file @
57c03dfe
...
@@ -62,7 +62,8 @@ def flip_image(image: np.ndarray, use_numpy: bool = False) -> np.ndarray:
...
@@ -62,7 +62,8 @@ def flip_image(image: np.ndarray, use_numpy: bool = False) -> np.ndarray:
# 此函数读取了随包数据中的test_image.txt
# 此函数读取了随包数据中的test_image.txt
def
read_default_image
():
def
read_default_image
():
"""Read default image.
"""
Read default image.
This function reads the default image associated with this package.
This function reads the default image associated with this package.
...
...
csst_proto/flip_image_in_parallel.py
View file @
57c03dfe
...
@@ -16,7 +16,8 @@ from .flip_image import flip_image
...
@@ -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
]:
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`.
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
...
@@ -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
]:
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`.
Flip images in parallel with `joblib`.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment