Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/sharpedge/_utils/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ def _input_checker(img_array):
# Check the image format: must be a numpy array
if not isinstance(img_array, np.ndarray):
raise TypeError("Image format must be a numpy array.")
# Check input image array shape
if not (img_array.ndim == 2 or (img_array.ndim == 3 and img_array.shape[2] == 3)):
raise ValueError(
f"Invalid image shape: {img_array.shape}. "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be an indention issue?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right. thanks for point it out. I have fixed it.

"Expected 2D (grayscale) or 3D with 3 channels (RGB)."
)
Loading