home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1236714136

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/6752#issuecomment-1236714136 https://api.github.com/repos/pydata/xarray/issues/6752 1236714136 IC_kwDOAMm_X85JtsKY 21131639 2022-09-05T08:48:23Z 2022-09-05T08:48:23Z CONTRIBUTOR

We used the .indexes property to implement a workaround for serializing Datasets containing multiindices to netCDF. For this the implementation basically looked like this: (Inspired by and related to this issue: https://github.com/pydata/xarray/issues/1077)

Saving dataset as NetCDF: 1. Loop over dataset.indexes 2. Check if index is a multi index 3. If so, encode it somehow and save it as attribute in the dataset 4. Reset (remove) the index 5. Now save this "patched" dataset as NetCDF

And then loading it again: 1. Load the dataset 2. Check if this special attribute exists 3. If so decode the multiindex and set it as index in the dataset

When testing the pre-release version I noticed some of our tests failing, which is why I raised this issue in the first place - in case those changes were unwanted. I was not aware that you were actively working on multi index changes and therefore expecting API changes here. With that in mind I'll probably be able to adapt our code to this new API of indexes and xindexes.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1293460108
Powered by Datasette · Queries took 0.814ms · About: xarray-datasette