Skip to content

Handle fill value edge cases (NaN, Inf, variable-length strings) #6

@jhamman

Description

@jhamman

Summary

The Zarr V3 spec supports fill values that include special floating-point values (NaN, Infinity, -Infinity) and variable-length data types (e.g., variable-length UTF-8 strings). The current implementation may not handle all of these correctly.

Specific cases to address

Special float fill values

  • NaN — Zarr V3 encodes as the string "NaN" in JSON metadata
  • Infinity / -Infinity — encoded as "Infinity" / "-Infinity"
  • These need special parsing since JSON doesn't natively support these values

Variable-length strings

  • Zarr V3 has a string data type with variable-length UTF-8 encoding
  • Fill value is typically "" (empty string)
  • The current Julia bindings support 14 numeric types but may not handle string arrays

Acceptance criteria

  • Arrays with NaN fill value can be created and read back correctly
  • Arrays with Infinity/-Infinity fill values work correctly
  • Add tests for special fill value round-trips
  • Document any data type limitations

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions