Antonio Valentino pushed to branch master at Debian GIS Project / flox
Commits: 3ec65bbd by Antonio Valentino at 2025-08-22T05:39:22+00:00 New upstream version 0.10.6 - - - - - e837c137 by Antonio Valentino at 2025-08-22T05:39:26+00:00 Update upstream source from tag 'upstream/0.10.6' Update to upstream version '0.10.6' with Debian dir 108121766c52044ced130092ed8051001ed24830 - - - - - 6d69fc9f by Antonio Valentino at 2025-08-22T05:40:09+00:00 New upstream release - - - - - c54797ed by Antonio Valentino at 2025-08-22T05:40:46+00:00 Set distribution to unstable - - - - - 3 changed files: - debian/changelog - flox/core.py - tests/test_xarray.py Changes: ===================================== debian/changelog ===================================== @@ -1,3 +1,9 @@ +flox (0.10.6-1) unstable; urgency=medium + + * New upstream release. + + -- Antonio Valentino <[email protected]> Fri, 22 Aug 2025 05:40:31 +0000 + flox (0.10.5-1) unstable; urgency=medium * New upstream release. ===================================== flox/core.py ===================================== @@ -892,7 +892,8 @@ def reindex_( "Currently does not support reindexing with object arrays of tuples. " "These occur when grouping by multi-indexed variables in xarray." ) - if fill_value is xrdtypes.NA or isnull(fill_value): + # Use '==' instead of 'is', as Dask serialization can break identity checks. + if fill_value == xrdtypes.NA or isnull(fill_value): new_dtype, fill_value = xrdtypes.maybe_promote(array.dtype) else: new_dtype = array.dtype @@ -1380,7 +1381,8 @@ def _finalize_results( if fill_value is None: raise ValueError("Filling is required but fill_value is None.") # This allows us to match xarray's type promotion rules - if fill_value is xrdtypes.NA: + # Use '==' instead of 'is', as Dask serialization can break identity checks. + if fill_value == xrdtypes.NA: new_dtype, fill_value = xrdtypes.maybe_promote(finalized[agg.name].dtype) finalized[agg.name] = finalized[agg.name].astype(new_dtype) ===================================== tests/test_xarray.py ===================================== @@ -798,3 +798,16 @@ def test_groupby_preserve_dtype(reduction): expected = getattr(np, reduction)(ds.test.data, axis=0).dtype assert actual == expected + + +@requires_dask +def test_resample_first_last_empty(): + with xr.set_options(use_flox=True), dask.config.set(scheduler="processes"): + arr = xr.DataArray( + np.nan, + coords={ + "date": pd.to_datetime(["2025-03-24", "2025-06-23"]), + }, + dims=["date"], + ).chunk(date=(1, 1)) + arr.resample(date="QE").last().compute() View it on GitLab: https://salsa.debian.org/debian-gis-team/flox/-/compare/8e6bbea2cfc2f00da5eabde1d16a0a036eb64fbb...c54797edee6dfb30fa2ba643ee2abafc665ce686 -- View it on GitLab: https://salsa.debian.org/debian-gis-team/flox/-/compare/8e6bbea2cfc2f00da5eabde1d16a0a036eb64fbb...c54797edee6dfb30fa2ba643ee2abafc665ce686 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ Pkg-grass-devel mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel
