home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1235974050

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/6978#issuecomment-1235974050 https://api.github.com/repos/pydata/xarray/issues/6978 1235974050 IC_kwDOAMm_X85Jq3ei 39069044 2022-09-02T23:23:51Z 2022-09-02T23:23:51Z CONTRIBUTOR

Thanks for doing this @slevang ! Would you mind adding a tiny regression test too?

Right, I guess this actually breaks the previous way of passing kwargs and that is why the docs build failed. Hmmm. To go with the current changes, thoughts on adding something like this to the parsing logic: python if kwargs is None: kwargs = {} elif "kwargs" in kwargs: kwargs = {**kwargs.pop("kwargs"), **kwargs} to allow for the desired functionality but also handle the old case when someone passes kwargs as a dict? Feels wonky but it works. Is there a smarter way of doing this?

BTW it took me a minute to figure out what happened here because the docstring in the original PR was actually correct (requiring a dict, albeit maybe not the best way of passing kwargs), but then got changed in #5182 to suggest that kwargs could be passed on their own. I see .interp() behaves the same, where only a dict of kwargs can be provided and passed to the underlying scipy interpolation. So it could be worth generalizing this for other methods where we are passing kwargs to a child function of some sort, to allow both of these patterns.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1359368857
Powered by Datasette · Queries took 0.656ms · About: xarray-datasette