Skip to content

Enable fill value for StructuredType Variables #588

@BrianMichell

Description

@BrianMichell

Once the bug is resolved we can re-enable fill values for StructuredType Variables.

  • Bump the minimum version of Xarray.
  • Fill Values should be encoded to follow the default fill values ScalarType Variables.
  • Add unit tests for proper fill value serialization of StructuredType Variables.
import numpy as np
# from mdio.somewhere import constants as fills
# TODO: These constants have not been merged into the V1 branch yet.

field = {
  [
    { "format": "int32", "name": "foo" },
    { "format": "float16", "name": "bar" },
    { "format": "bool", "name": "baz" }
  ]
}

# TODO: Automatically build the below structure given `field`. Order matters!

fill_values = np.dtype([(np.int32, fills.int32), (np.float16, fills.int16), (np.bool, fills.bool)])

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions