-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serialization of just coordinates #2347
Comments
@hmaarrfk - sorry no one replied to your issue. I would personally be fine with adding this to the Coordinates API. |
no need to be sorry. These two functions were easy enough for me to do myself in my own codebase. There are few issues that I've found doing this though. |
This came up in zarr-developers/zarr-python#156 (comment), where @jewfro-cuban suggested using json-tricks to encode numpy arrays. My preferred solution would be to use a different serialization format, like netcdf or zarr. |
mind blown!!!! thanks for that pointer I haven't touched my serialization code in a while, kinda scared to go back to it now, but I will keep that library in mind. I saw Zarr a while back, looks cool. I hope to see it grow. |
If I'm not mistaken, this appears to have been addressed by #2659. Should we close this issue? |
This is likely true. Thanks for looking back into this. |
In the search for the perfect data storage mechanism, I find myself needing to store some of the images I am generating the metadata seperately. It is really useful for me to serialize just the coordinates of my DataArray.
My serialization method of choice is json since it allows me to read the metadata with just a text editor. For that, having the coordinates as a self contained dictionary is really important.
Currently, I convert just the coordinates to a dataset, and serialize that. The code looks something like this:
Would encapsulating this functionality in the
Coordinates
class be accepted as a PR?It would add 2 functions that would look like:
The text was updated successfully, but these errors were encountered: