-
Notifications
You must be signed in to change notification settings - Fork 3
Issue #1492 migrate from fastcore to plum #1493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…type for get_grid_geometry_hash, add dispatched functions that do not have Any type
|
return _clip_by_grid_line_data(package, active) | ||
|
||
|
||
# For some reason the plum dispatching finds "active: GridDataArray" ambiguous |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe raise an issue about this on the their board? Seems like something that should be supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have time now to further investigate this. Seems somewhat related to this beartype/plum#149.
Fixes #1492
Description
Replace fastcore typedispatching with plum's dispatching.
Plum is a bit stricter, which I generally think is good. When fastcore's typedispatching didn't encounter a typedispatched fallback function for type
Any
, for some reason things worked, but I'm not sure what it did. Plum is stricter so I had to explicitly had to add some fallback functions to either raise an error or do something.In detail, this PR
clip_by_grid
method for GridDataArray into one for xr.DataArray and xu.UgridDataArray, as plum apparently thinks this ambiguous.create_exchange_package
to become DataArrayenforce_dim_order
andis_unstructured
enforce_dim_order
withNone
object
toAny
, to also supportNone
Checklist
Issue #nr
, e.g.Issue #737