Add complex dtype support to FillValueCoder for Zarr backend#11151
Add complex dtype support to FillValueCoder for Zarr backend#11151jsignell merged 12 commits intopydata:mainfrom
Conversation
|
@dcherian thanks for your review. Do I need to get mypy working for this PR to go into main? The failures are in the function that I worked on, but unrelated to the changes that I made. |
jsignell
left a comment
There was a problem hiding this comment.
Looks good! Mentioned offline that I think the suggestion in https://github.com/pydata/xarray/pull/11151/changes#r2805178961 was to write a hypothesis test, so just that and one little nit.
|
@maxrjones the hypothesis test looks good. Whenever you are done, just add a line to "what's new" and then this is good to merge. |
thanks, Julia! I added this as a "feature", but wasn't 100% confident in the categorization. Please let me know if I should move it elsewhere. |
…11151) Add support for encoding/decoding complex fill values (complex64, complex128) in the Zarr backend's FillValueCoder, which previously raised ValueError for complex dtypes. This enables converting/virtualizing NetCDF files with these fill values to Zarr.
This PR adds support for encoding/decoding complex fill values (complex64, complex128) in the Zarr backend's FillValueCoder, which previously raised ValueError for complex dtypes. This enables converting/virtualizing NetCDF files with these fill values to Zarr. As an example, this change unlocks virtualizing full NISAR granules using VirtualiZarr + Xarray.
Each component (real/imag) is base64-encoded as a little-endian double, consistent with how float fill values are already handled and ensuring safe JSON round-tripping of special values like NaN and Infinity.
whats-new.rstapi.rst