mirror of
https://github.com/wassname/segpy.git
synced 2026-06-27 20:22:56 +08:00
Return double-precision IEEE float values when reading single-precision IBM floats to prevent loss of precision.
This commit is contained in:
+1
-1
@@ -454,7 +454,7 @@ def unpack_ibm_floats(data, count):
|
||||
Returns:
|
||||
A sequence of floats.
|
||||
"""
|
||||
return array('f', (ibm2ieee(data[i: i+4]) for i in range(0, count * 4, 4)))
|
||||
return array('d', (ibm2ieee(data[i: i+4]) for i in range(0, count * 4, 4)))
|
||||
|
||||
|
||||
def unpack_values(buf, count, item_size, fmt, endian='>'):
|
||||
|
||||
Reference in New Issue
Block a user