Skip to content

Commit

Permalink
fix: interface change in h3 library (list instead of set) (#436)
Browse files Browse the repository at this point in the history
* fix: adjust to h3 library returning list instead of set

* chore: update CHANGELOG

---------

Co-authored-by: Kamil Raczycki <raczyckikamil@gmail.com>
  • Loading branch information
piotrgramacki and RaczeQ authored Apr 17, 2024
1 parent cf6e48e commit 3d34782
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Issue caused by the change in the `h3-py` library 4.0.0b3 [#431](https://github.com/kraina-ai/srai/issues/431)

## [0.7.0] - 2024-02-02

### Added
Expand Down
4 changes: 2 additions & 2 deletions srai/neighbourhoods/h3_neighbourhood.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_neighbours_up_to_distance(
if self._distance_incorrect(distance):
return set()

neighbours: set[str] = h3.grid_disk(index, distance)
neighbours: set[str] = set(h3.grid_disk(index, distance))
neighbours = self._handle_center(
index, distance, neighbours, at_distance=False, include_center_override=include_center
)
Expand All @@ -108,7 +108,7 @@ def get_neighbours_at_distance(
if self._distance_incorrect(distance):
return set()

neighbours: set[str] = h3.grid_ring(index, distance)
neighbours: set[str] = set(h3.grid_ring(index, distance))
neighbours = self._handle_center(
index, distance, neighbours, at_distance=True, include_center_override=include_center
)
Expand Down

0 comments on commit 3d34782

Please sign in to comment.