We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dffdb1 commit cc5ec7bCopy full SHA for cc5ec7b
src/reward_preprocessing/common/utils.py
@@ -141,7 +141,10 @@ def visualize_samples(samples: np.ndarray, save_dir):
141
142
143
def process_image_array(img: np.ndarray) -> np.ndarray:
144
- """Process a numpy array for feeding into PIL.Image.fromarray."""
+ """Process a numpy array for feeding into PIL.Image.fromarray.
145
+
146
+ Should already be in (h,w,c) format.
147
+ """
148
up_multiplied = img * 255
149
clipped = np.clip(up_multiplied, 0, 255)
150
cast = clipped.astype(np.uint8)
0 commit comments