Skip to content

Commit b4ce4bc

Browse files
committed
Support numpy 2.0
1 parent c25b50d commit b4ce4bc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

sr/robot3/simulator/camera.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,7 @@ def read(self, fresh: bool = True) -> NDArray:
6464
rgb_frame_raw: NDArray[np.uint8] = np.frombuffer(img_data, np.uint8)
6565

6666
# Height is first, then width, then channels
67-
return rgb_frame_raw.reshape( # type: ignore[call-overload,unused-ignore]
68-
(self.image_size[1], self.image_size[0], 4),
69-
copy=True,
70-
)
67+
return rgb_frame_raw.reshape((self.image_size[1], self.image_size[0], 4)).copy()
7168

7269
def close(self) -> None:
7370
"""Close the underlying socket on exit."""

0 commit comments

Comments
 (0)