Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shape check for arbitrary types for DataStats #7082

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion monai/transforms/utility/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def __call__(
if self.data_type if data_type is None else data_type:
lines.append(f"Type: {type(img)} {img.dtype if hasattr(img, 'dtype') else None}")
if self.data_shape if data_shape is None else data_shape:
lines.append(f"Shape: {img.shape}")
lines.append(f"Shape: {img.shape if hasattr(img, 'shape') else None}")
if self.value_range if value_range is None else value_range:
if isinstance(img, np.ndarray):
lines.append(f"Value range: ({np.min(img)}, {np.max(img)})")
Expand Down
Loading