Skip to content
GitLab
Explore
Projects
Groups
Snippets
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
f98b9bba
Commit
f98b9bba
authored
2 years ago
by
BO ZHANG
Browse files
Options
Download
Email Patches
Plain Diff
updated docstring
parent
de828313
dev
main
No related merge requests found
Pipeline
#45
passed with stages
in 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
csst_proto/flip_image.py
+5
-3
csst_proto/flip_image.py
csst_proto/some_other_modules.py
+3
-0
csst_proto/some_other_modules.py
csst_proto/top_level_interface.py
+2
-1
csst_proto/top_level_interface.py
with
10 additions
and
4 deletions
+10
-4
csst_proto/flip_image.py
+
5
-
3
View file @
f98b9bba
...
...
@@ -4,7 +4,7 @@ from . import PACKAGE_PATH
# the main algorithm
def
flip_image
(
img
:
np
.
ndarray
):
def
flip_image
(
img
:
np
.
ndarray
)
->
np
.
ndarray
:
""" flip an input image
This function uses an awesome algorithm to flip an input image.
...
...
@@ -16,14 +16,16 @@ def flip_image(img: np.ndarray):
Returns
-------
the flipped image
img_flipped: np.ndarray
the flipped image
"""
try
:
assert
img
.
ndim
==
2
img_flipped
=
img
[::
-
1
,
::
-
1
]
return
img_flipped
except
AssertionError
:
raise
AssertionError
(
"The input image is {}D not 2D!"
.
format
(
img
.
ndim
))
return
img
[::
-
1
,
::
-
1
]
# a demo on how to read test image
...
...
This diff is collapsed.
Click to expand it.
csst_proto/some_other_modules.py
+
3
-
0
View file @
f98b9bba
def
some_arbitrary_functions
():
""" an arbitrary function """
return
This diff is collapsed.
Click to expand it.
csst_proto/top_level_interface.py
+
2
-
1
View file @
f98b9bba
from
.flip_image
import
flip_image
,
read_test_image
from
.some_other_modules
import
some_arbitrary_functions
__all__
=
[
"flip_image"
,
"read_test_image"
]
__all__
=
[
"flip_image"
,
"read_test_image"
,
"some_arbitrary_functions"
]
This diff is collapsed.
Click to expand it.
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
Menu
Explore
Projects
Groups
Snippets