Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 9e0fbc3

Browse files
Merge pull request #728 from openclimatefix/issue/bug-int
make sure slice on osgb is ints
2 parents db2af0c + 2b0490d commit 9e0fbc3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
commit = True
33
tag = True
44
current_version = 3.8.0
5+
message = Bump version: {current_version} → {new_version} [skip ci]
56

67
[bumpversion:file:setup.py]
78
search = version="{current_version}"

nowcasting_dataset/data_sources/data_source.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ def get_example(self, location: SpaceTimeLocation) -> xr.Dataset:
445445
x_center_osgb=x_center_osgb, y_center_osgb=y_center_osgb
446446
)
447447
selected_data = selected_data.sel(
448-
x_osgb=slice(bounding_box.left, bounding_box.right),
449-
y_osgb=slice(bounding_box.top, bounding_box.bottom),
448+
x_osgb=slice(int(bounding_box.left), int(bounding_box.right)),
449+
y_osgb=slice(int(bounding_box.top), int(bounding_box.bottom)),
450450
)
451451

452452
# selected_sat_data is likely to have 1 too many pixels in x and y

0 commit comments

Comments
 (0)