Closed ianthomas23 closed 1 year ago
Merging #1198 (c6c4c3d) into main (3d2f7df) will increase coverage by
0.02%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #1198 +/- ##
==========================================
+ Coverage 84.68% 84.70% +0.02%
==========================================
Files 35 35
Lines 8345 8357 +12
==========================================
+ Hits 7067 7079 +12
Misses 1278 1278
Impacted Files | Coverage Δ | |
---|---|---|
datashader/data_libraries/pandas.py | 100.00% <ø> (ø) |
|
datashader/compiler.py | 92.90% <100.00%> (+0.09%) |
:arrow_up: |
datashader/core.py | 88.38% <100.00%> (ø) |
|
datashader/data_libraries/dask.py | 95.16% <100.00%> (+0.16%) |
:arrow_up: |
datashader/data_libraries/dask_xarray.py | 98.95% <100.00%> (+0.03%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Test failures are because our CI conda environments are now using pandas 2.0.0
which is incompatible with recent xarray
, so the version of xarray
installed is 0.19.0
from July 2021. xarray
will fix this in due course, in the mean time I will try pinning pandas < 2
to test this PR.
Looks like the ranges are slightly larger than the coordinates would suggest. Is that just due to the size of each array cell? If so, having the ranges explicitly listed is indeed useful.
Yes, linear coordinates are equally spaced and the end coordinates are half a cell width inside the ends. The ranges are therefore easy to calculate from the coordinates. But with logarithmic axes the maths is non-trivial so it is useful for the ranges to always be available.
Closes #1157.
This PR adds new attributes
x_range
andy_range
to aggregations returned from datashader. Simple example:Output produced:
so the attributes can be accessed using
agg.x_range
and similar.The ranges are set regardless of whether they are specified by the user in the
Canvas
constructor, or determined from the data limits.For situations that return an
xarray.Dataset
rather than anxarray.DataArray
, e.g. if ads.summary()
is used, the attributes are copied to theDataset
. Hence they are always available as attributes of the top-level object returned fromCanvas
aggregation functions.