home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 798252585

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/5008#issuecomment-798252585 https://api.github.com/repos/pydata/xarray/issues/5008 798252585 MDEyOklzc3VlQ29tbWVudDc5ODI1MjU4NQ== 14371165 2021-03-13T12:05:00Z 2021-03-13T12:05:00Z MEMBER

Well, as a user I was very confused why my boolean variables silently disappeared. And I don't get why ds.interp has any mandate to drop variables, if it can't handle interpolating a variable with the method an error should've been raised. But I'm a lazy user too so I of course would prefer to not have to deal with errors or figure out which variables were dropped and do multiple interpolation steps and finally merge the different datasets back together again. This is why I prefer ds.interp to do the only current method that makes sense for non-numerics rather than dropping them.

ds.interp currently only interpolates if var.dtype.kind in "uifc", so it ignores bools, strings, and objects for any method. Which made sense I think because the scipy interpolants always attempts to force to float. This is why I use reindex_variables as it both retains the dtype and handles strings/objects just fine.

I've added a parameter now method_for_non_numerics for these cases now, so now you can choose which reindex method you want.

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