Closed ianthomas23 closed 1 year ago
Merging #1185 (399b36c) into main (aed1760) will increase coverage by
0.00%
. The diff coverage is85.71%
.
@@ Coverage Diff @@
## main #1185 +/- ##
=======================================
Coverage 85.39% 85.39%
=======================================
Files 35 35
Lines 8016 8023 +7
=======================================
+ Hits 6845 6851 +6
- Misses 1171 1172 +1
Impacted Files | Coverage Δ | |
---|---|---|
datashader/datatypes.py | 93.75% <85.71%> (-0.15%) |
:arrow_down: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
After rebasing this is passing CI.
Fixes #1158.
This removes all warnings caused by
numpy
conversions of ragged arrays which will be errors innumpy
1.24. In fact there weren't any problems in the library code itself as if you follow the docstrings you will create ragged arrays correctly, but some of the tests used shortcuts instead of the recommended way and these have been changed in this PR.Either of these are correct ways to create a
DataFrame
series that is a ragged array to use indatashader
:The
dtype
is optional forRaggedArray
as it is inferred.The following worked in the past but are incorrect using
numpy
1.24 onwards:The first approach will immediately fail, telling you to use the second
dtype=object
approach. This works for some but not all codepaths indatashader
as it drops important dtype information. Hence avoid both.Eventually the
RaggedArray
pandas extension array withindatashader
will be replaced byawkward-array
and will simplify our code and make it more robust to future changes.