Skip to content

[Feature Request] Add to_bytes and from_bytes to shape classes #2337

@sebastian-goeldi

Description

@sebastian-goeldi

Hi Matthias,

Not sure how feasible it would be, but here goes:

I would like to be able to serialize the shapes to bytes, similarly to to_s and from_s on a lot of them. This would be helpful because then I can store some keys for hashing etc in files. I would like to avoid the strings as that seems inefficient, but also I assume for floats that's not necessarily truly accurate ;).

For context: What I want to build is something that allows me to cache results in partial gds files related to function calls. These function calls are cached and if they use e.g. a box, I need to be able to serialize/deserialize them (in python I am doing that with pickle and copyreg and am currently using to_s() and from_s()).

Sebastian

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions