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/issues/4610#issuecomment-853138609,https://api.github.com/repos/pydata/xarray/issues/4610,853138609,MDEyOklzc3VlQ29tbWVudDg1MzEzODYwOQ==,12237157,2021-06-02T15:45:45Z,2021-06-02T15:45:45Z,CONTRIBUTOR,"> This makes sense, but it sounds like this suggestion (of accepting Datasets not just DataArrays) is mostly a convenience tool for applying histograms to particular variables across multiple datasets quickly. It's not fundamentally different to picking and choosing the variables you want from multiple datasets and feeding them in to histogram as dataarrays. agree. > I think we should focus on including features that enable analyses that would otherwise be difficult or impossible, for example ND bins looking forward to the PR","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,750985364 https://github.com/pydata/xarray/issues/4610#issuecomment-852944667,https://api.github.com/repos/pydata/xarray/issues/4610,852944667,MDEyOklzc3VlQ29tbWVudDg1Mjk0NDY2Nw==,12237157,2021-06-02T11:22:07Z,2021-06-02T11:22:07Z,CONTRIBUTOR,"I like your explanation of the two different inputs @dougiesquire and for multi-dim datasets these must be xr.datasets. my point about the `bins` is that if the inputs are two xr.datasets, then also the bins should be two xr.datasets. If the `bins` were only two xr.Arrays, then how could these bins discriminate for the different variables in the inputs?","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,750985364 https://github.com/pydata/xarray/issues/4610#issuecomment-852428526,https://api.github.com/repos/pydata/xarray/issues/4610,852428526,MDEyOklzc3VlQ29tbWVudDg1MjQyODUyNg==,12237157,2021-06-01T20:36:25Z,2021-06-01T20:36:25Z,CONTRIBUTOR,"I am unsure about this and cannot manage to put my Südasien down precisely. Calculating a contingency table for instance between two multivar inputs: ˋˋˋ xhistogram(ds_observations_multivar, ds_forecast_multivar, bins=[ds_obs_multivar_edges, ds_forecast_multivar_edges ]) ˋˋˋ as in https://github.com/xarray-contrib/xskillscore/blob/6f7be06098eefa1cdb90f7319f577c274621301c/xskillscore/core/contingency.py#L156 maybe @dougiesquire can phrase this more precisely","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,750985364 https://github.com/pydata/xarray/issues/4610#issuecomment-852364749,https://api.github.com/repos/pydata/xarray/issues/4610,852364749,MDEyOklzc3VlQ29tbWVudDg1MjM2NDc0OQ==,12237157,2021-06-01T18:51:47Z,2021-06-01T18:51:47Z,CONTRIBUTOR,"> What I'm unclear about is what you want to achieve by inputting an xarray.Dataset that couldn't be done with inputs of ND xr.DataArrays as both data and bins? with dataset bins I want to have different bin_edges for each dataset. If bins is only a dataArray, I cannot have this. Can I?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,750985364 https://github.com/pydata/xarray/issues/4610#issuecomment-852231700,https://api.github.com/repos/pydata/xarray/issues/4610,852231700,MDEyOklzc3VlQ29tbWVudDg1MjIzMTcwMA==,12237157,2021-06-01T15:45:00Z,2021-06-01T15:45:00Z,CONTRIBUTOR,"I tried to show in https://gist.github.com/aaronspring/251553f132202cc91aadde03f2a452f9 how I would like to use xr.Datasets as `bins`, e.g. defining bin edges based on quantiles of the climatology, i.e. bin edges depend on `lon`, `lat`, maybe `weekofyear` and `variable`. I tried show in the gist that I could be also nice to allow xr.Datasets as bins if the inputs are xr.Datasets. > You can already choose different bins to use for each input variable` I cannot find this in #5400. I should checkout and run the code locally. Yep, the example xskillscore code posted doesnt allow nd bins. forgot that. correct. in my head thinking about the future it does. https://github.com/xarray-contrib/xskillscore/blob/6f7be06098eefa1cdb90f7319f577c274621301c/xskillscore/core/probabilistic.py#L498 takes xr.Datasets as bins and in a previous version we used `xhist` but then changed to make this run on `nd` arrays and `xr.Datasets`.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,750985364 https://github.com/pydata/xarray/issues/4610#issuecomment-852120100,https://api.github.com/repos/pydata/xarray/issues/4610,852120100,MDEyOklzc3VlQ29tbWVudDg1MjEyMDEwMA==,12237157,2021-06-01T13:22:25Z,2021-06-01T13:24:19Z,CONTRIBUTOR,"what about a list of `xarray.Datasets` as `bins`? suppose you have an `xr.Dataset` you want to bin different variables for different bins (eg from xr.Dataset.quantile) @dougiesquire implemented this in https://github.com/xarray-contrib/xskillscore/blob/2217b58c536ec1b3d2c42265ed6689a740c2b3bf/xskillscore/core/utils.py#L133 EDIT: seeing now that this issue and #5400 aims to implement xr.DataArray.hist only. xr.Dataset would be also nice :)","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,750985364