Closed here-abarany closed 1 year ago
@cowtowncoder Just wanted to make sure you saw this PR. It's a relatively small addition, especially compared to my previous submission.
Excellent, @here-abarany -- sounds like useful feature, simple enough implementation. Could even consider possibility of porting to Smile format backend. But for now I'll merge it.
Ok, merged in 2.15 then to master.
Thanks!
Enabling WRITE_MINIMAL_DOUBLES works similarly to WRITE_MINIMAL_INTS, choosing to use a smaller data representation (single-precision float) when the conversion will result in no loss of data. This can provide a substantial savings for data that contains many doubles that don't require full precision.
Cleaned up some of the writing code for floats and doubles to avoid code duplication, and reserve the proper amount of space for output for both types.