Zulip Chat Archive

Stream: lean4

Topic: Storing FloatArray?


Siddhartha Gadgil (Aug 04 2023 at 09:00):

What is an efficient way to store a bunch (about 9000) of FloatArray's to a file (or to files) from Lean (to load in Lean)?

Thanks.

Arthur Paulino (Aug 04 2023 at 10:21):

Probably an unpopular idea: do it in C via FFI. You can just dump the bytes and read them later

Siddhartha Gadgil (Aug 04 2023 at 10:34):

Only unpopular with me because I have low confidence in my FFI abilities (I am a mathematician, not a computer scientist).

Sebastian Ullrich (Aug 04 2023 at 10:39):

There is no need for that, use the .olean format via e.g. docs#pickle and you have the same reasonably compact layout as in memory


Last updated: Dec 20 2023 at 11:08 UTC