Skip to content

Commit

Permalink
data_utils: Remove unused bytes_to_floats again
Browse files Browse the repository at this point in the history
  • Loading branch information
fischeti committed Jan 19, 2024
1 parent d99a00f commit 91c0094
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions util/sim/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@ def bytes_to_doubles(byte_array):
doubles.append(double)
return doubles

def bytes_to_floats(byte_array):
float_size = struct.calcsize('f') # Size of a float in bytes
num_floats = len(byte_array) // float_size

# Unpack the byte array into a list of doubles
floats = []
for i in range(num_floats):
float_bytes = byte_array[i * float_size:(i + 1) * float_size]
float = struct.unpack('<f', float_bytes)[0]
floats.append(float)
return floats


def bytes_to_uint32s(byte_array):
uint32_size = struct.calcsize('I') # Size of a uint32 in bytes
Expand Down

0 comments on commit 91c0094

Please sign in to comment.