Skip to content

Commit cc5ec7b

Browse files
committed
Clarify input shape of process_image_array
1 parent 2dffdb1 commit cc5ec7b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/reward_preprocessing/common/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ def visualize_samples(samples: np.ndarray, save_dir):
141141

142142

143143
def process_image_array(img: np.ndarray) -> np.ndarray:
144-
"""Process a numpy array for feeding into PIL.Image.fromarray."""
144+
"""Process a numpy array for feeding into PIL.Image.fromarray.
145+
146+
Should already be in (h,w,c) format.
147+
"""
145148
up_multiplied = img * 255
146149
clipped = np.clip(up_multiplied, 0, 255)
147150
cast = clipped.astype(np.uint8)

0 commit comments

Comments
 (0)