Closed ianthomas23 closed 1 year ago
Merging #1218 (26c8f4a) into main (8092f4d) will increase coverage by
0.32%
. The diff coverage is95.35%
.
@@ Coverage Diff @@
## main #1218 +/- ##
==========================================
+ Coverage 84.52% 84.85% +0.32%
==========================================
Files 35 35
Lines 8369 8570 +201
==========================================
+ Hits 7074 7272 +198
- Misses 1295 1298 +3
Impacted Files | Coverage Δ | |
---|---|---|
datashader/data_libraries/pandas.py | 100.00% <ø> (ø) |
|
datashader/reductions.py | 84.70% <93.24%> (+1.59%) |
:arrow_up: |
datashader/compiler.py | 91.07% <100.00%> (+0.50%) |
:arrow_up: |
datashader/core.py | 88.28% <100.00%> (+0.04%) |
:arrow_up: |
datashader/data_libraries/dask.py | 95.23% <100.00%> (+0.07%) |
:arrow_up: |
datashader/data_libraries/dask_xarray.py | 98.95% <100.00%> (ø) |
|
datashader/transfer_functions/__init__.py | 87.03% <100.00%> (+0.12%) |
:arrow_up: |
datashader/utils.py | 81.86% <100.00%> (+2.61%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Fixes #1216.
Summary of fixes:
Conversion of float array containing NaN to integer:
np.nan_to_number
to convertnp.nan
to0
, which is the number that has always been returned in this scenario.category_binning
already determines a mask of the NaN values, so those NaN values are set to 0 (they could be any valid finite number) before the conversion to int.Canvas.raster
we avoid the warning by using afill_value
of0
for integerdtype
s as that is what the docstring says is used in this scenario.Warnings about finding max or min of an "all-nan slice" are specifically ignored as they already return the expected value of
nan
in this situation.