We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 626882b + 5738fa3 commit 52b54f5Copy full SHA for 52b54f5
Malmo/samples/Python_examples/radar_test.py
@@ -96,7 +96,7 @@ def processFrame(self, frame):
96
97
# Get the depth value from the centre of the map:
98
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
+ depth = scale * struct.unpack('f', bytes(frame.pixels[mid_pix:mid_pix + 4]))[0] # unpack 32bit float
100
101
# Draw the "blip":
102
x = cx + depth * math.cos(angle)
0 commit comments