xgcm / xhistogram

Fast, flexible, label-aware histograms for numpy and xarray
https://xhistogram.readthedocs.io
MIT License
89 stars 19 forks source link

Ensure args to xhistogram.xarray is a list #79

Closed dougiesquire closed 1 year ago

dougiesquire commented 1 year ago

Currently, providing weights with keep_coords=True produces a TypeError when args (a tuple) and weights (a list) are concatenated. This PR ensures that args is a list.

Closes #78

codecov[bot] commented 1 year ago

Codecov Report

Merging #79 (0fa46d4) into master (0d3bf5a) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #79      +/-   ##
==========================================
+ Coverage   97.18%   97.20%   +0.01%     
==========================================
  Files           2        2              
  Lines         249      250       +1     
  Branches       71       71              
==========================================
+ Hits          242      243       +1     
  Misses          5        5              
  Partials        2        2              
Impacted Files Coverage Δ
xhistogram/xarray.py 96.49% <100.00%> (+0.06%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

dougiesquire commented 1 year ago

Seeing the same CI test failures reported by @jbusecke in #74.

Also, readthedocs build is suddenly failing for reasons I don't understand. UPDATE: The readthedocs failure is due to a compatibility issue between xarray=2022.6.0 and numpy=1.20 which will be fixed in the next xarray release.