Skip to content

Commit 52b54f5

Browse files
committed
Merge branch 'master' of https://github.com/Microsoft/malmo
2 parents 626882b + 5738fa3 commit 52b54f5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Malmo/samples/Python_examples/radar_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def processFrame(self, frame):
9696

9797
# Get the depth value from the centre of the map:
9898
mid_pix = 2 * video_width * (video_height + 1) # flattened index of middle pixel
99-
depth = scale * struct.unpack('f', str(frame.pixels[mid_pix:mid_pix + 4]))[0] # unpack 32bit float
99+
depth = scale * struct.unpack('f', bytes(frame.pixels[mid_pix:mid_pix + 4]))[0] # unpack 32bit float
100100

101101
# Draw the "blip":
102102
x = cx + depth * math.cos(angle)

0 commit comments

Comments
 (0)