Closed keewis closed 8 months ago
+1 for switching to h3ronpy. I guess it is fine for now if coercing array-like to arrow and vice-versa feels a bit hacky. Mid-term I guess we'll need to properly address that in Xarray anyway.
I started to add tests for the h3
index, which should be run by CI once we have that.
It is still missing the tests for the different data types that we might pass on to h3ronpy
, but maybe we can just normalize the arguments in the accessor?
@benbovy, what do you think about merging this now, and we reorganize the tests later if necessary? (also #36)
@keewis yes let's merge this!
While
h3ronpy
is not exactly a replacement forh3
, it does provide vectorized functions through theh3ronpy.arrow
module. Since this is much more performant than the manual looping in python, this PR replaces the current implementation with theh3ronpy
functions.However, the
h3ronpy.arrow
functions are much stricter thanhealpy
in what they accept:coordinates_to_cells
refuses to work withnumpy
scalars, python lists, orxarray.DataArray
objects. I guess we need to figure out how to properly deal with those?