Closed ianthomas23 closed 1 year ago
Merging #1229 (bfdcc66) into main (28c8581) will decrease coverage by
0.04%
. The diff coverage is67.79%
.
@@ Coverage Diff @@
## main #1229 +/- ##
==========================================
- Coverage 83.62% 83.59% -0.04%
==========================================
Files 35 35
Lines 8738 8751 +13
==========================================
+ Hits 7307 7315 +8
- Misses 1431 1436 +5
Impacted Files | Coverage Δ | |
---|---|---|
datashader/transfer_functions/_cuda_utils.py | 20.63% <0.00%> (ø) |
|
datashader/reductions.py | 79.02% <47.05%> (-0.22%) |
:arrow_down: |
datashader/compiler.py | 88.42% <100.00%> (+0.06%) |
:arrow_up: |
datashader/utils.py | 81.63% <100.00%> (+0.09%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
We'll need some docs at the Datashader level when you're done with all this, of course.
Support for categorical
max_n
andmin_n
reductions such asds.by("cat", ds.max_n("value", n=3))
on CPU and GPU both with and without dask. This is the first part of issue #1210, support for categoricalfirst_n
,last_n
andwhere
to follow.Example:
which prints
Note that the returned DataArray has shape
(ny, nx, ncat, n)
which I think is more logical than the alternative possibility of(ny, nx, n, ncat)
.In terms of implementation, functions like
nanmax_n_in_place
now always accept a 4D array so that there is a single implementation for 3D (max
) and 4D (max_n
) arrays for each of CPU and GPU. Use of the combine function inmax
inserts the extra dimension of size 1 to change the shape without copying any data.