diff --git a/csst_proto/flip_image.py b/csst_proto/flip_image.py index b8cb64389be7e2d242d7e7d5f7d1dd478636fd36..f49510f3d9e6512e2fa7f4bce6b82320b9c50f4a 100644 --- a/csst_proto/flip_image.py +++ b/csst_proto/flip_image.py @@ -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 diff --git a/csst_proto/some_other_modules.py b/csst_proto/some_other_modules.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..9be71bfa173e7fa6d43a908dc3b901a81c382993 100644 --- a/csst_proto/some_other_modules.py +++ b/csst_proto/some_other_modules.py @@ -0,0 +1,3 @@ +def some_arbitrary_functions(): + """ an arbitrary function """ + return diff --git a/csst_proto/top_level_interface.py b/csst_proto/top_level_interface.py index d5b7afbf84e2dad4c9d747c3779edee41b4328e8..8c9ad77b2883d489bef75c4a521a28f8dc6c6af4 100644 --- a/csst_proto/top_level_interface.py +++ b/csst_proto/top_level_interface.py @@ -1,4 +1,5 @@ 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"]