Skip to content

Conversation

@benbovy
Copy link
Member

@benbovy benbovy commented Jul 17, 2022

It allows passing options to the constructor of a custom Index subclass, in case there's any relevant build options to expose to users. This could for example be the distance metric chosen for an index based on sklearn.neighbors.BallTree, or the CRS definition for a geospatial index.

The **options arguments of Dataset.set_xindex() are passed through.

An alternative way would be to pass options via coordinate metadata, like the spatial_ref coordinate in rioxarray. Perhaps both alternatives may co-exist?

This PR also adds type annotations to set_xindex().

benbovy added 2 commits July 17, 2022 21:47
It allows passing options to the constructor of a custom index class (if
any).

The **options arguments of Dataset.set_xindex() are passed through.

Also add type annotations to set_xindex().
@benbovy
Copy link
Member Author

benbovy commented Sep 2, 2022

See #6971.

@benbovy benbovy closed this Sep 2, 2022
@benbovy benbovy deleted the scipy22 branch December 8, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant