Skip to content

Commit c551998

Browse files
committed
fix bug
1 parent 5ce1f39 commit c551998

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
## Changes in 0.3.5 (in development)
2+
3+
- Fixed a bug in `rectify_dataset` where the conversion from block-space indices to
4+
global-space indices was incorrect when `output_indices_names` was provided.
5+
16
## Changes in 0.3.4
27

38
- Added `utils.transform_resolution` to convert spatial resolution between coordinate
49
reference systems (CRS).
510

11+
612
## Changes in 0.3.3
713

814
- Added function `utils.resolution_degrees_to_meters` to convert spatial resolution
915
from degrees to meters at a given geographic latitude.
1016

17+
1118
## Changes in 0.3.2
1219

1320
- Change inconsistent license classifier in `pyproject.toml`

xcube_resampling/rectify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def _downscale_source_dataset(
287287
interp_methods: Mapping[Hashable, SpatialInterpMethod],
288288
agg_methods: SpatialAggMethods | None,
289289
prevent_nan_propagations: PreventNaNPropagations,
290-
) -> (xr.Dataset, GridMapping):
290+
) -> tuple[xr.Dataset, GridMapping]:
291291
if all(v in (0, "nearest") for v in interp_methods.values()):
292292
return source_ds, source_gm
293293

xcube_resampling/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,10 +851,10 @@ def _map_to_source_indices(pixel_target_ij, indexing):
851851
"""
852852
offsets_x = da.zeros_like(pixel_target_ij[0])
853853
offsets_y = da.zeros_like(pixel_target_ij[1])
854+
th = offsets_x.chunksize[0]
855+
tw = offsets_x.chunksize[1]
854856

855857
ny, nx = indexing.ij_bboxes.shape[1:]
856-
th, tw = indexing.tile_size
857-
858858
for j in range(ny):
859859
for i in range(nx):
860860
bbox = indexing.ij_bboxes[:, j, i]

xcube_resampling/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2020
# DEALINGS IN THE SOFTWARE.
2121

22-
__version__ = "0.3.4"
22+
__version__ = "0.3.5.dev0"

0 commit comments

Comments
 (0)