Closed ianthomas23 closed 1 year ago
The latest spatialpandas
release included fixes for these (holoviz/spatialpandas#107). With that, running CI locally the only issues relating to ragged nested sequences occur in dask
and pandas
, which will be fixed in due course and are outside of our control. So I am closing this issue as no action is required in datashader
.
Since you are implementing your own handling of 'Ragged[...]'
types I don't think dask
and pandas
will ever handle the current CI failures.
Two most obvious incompatibilities for numpy 1.42 in your code are here:
Fixable by
diff -ur datashader-0.14.3.orig/datashader/core.py datashader-0.14.3/datashader/core.py
--- datashader-0.14.3.orig/datashader/core.py 2023-01-13 19:26:45.686618962 +0100
+++ datashader-0.14.3/datashader/core.py 2023-01-13 19:47:44.032324340 +0100
@@ -2,6 +2,7 @@
from numbers import Number
from math import log10
+import warnings
import numpy as np
import pandas as pd
@@ -422,7 +423,6 @@
if (line_width > 0 and ((cudf and isinstance(source, cudf.DataFrame)) or
(dask_cudf and isinstance(source, dask_cudf.DataFrame)))):
- import warnings
warnings.warn(
"Antialiased lines are not supported for CUDA-backed sources, "
"so reverting to line_width=0")
@@ -1248,8 +1248,8 @@
canvas.validate()
# All-NaN objects (e.g. chunks of arrays with no data) are valid in Datashader
- with np.warnings.catch_warnings():
- np.warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')
+ with warnings.catch_warnings():
+ warnings.filterwarnings('ignore', r'All-NaN (slice|axis) encountered')
return bypixel.pipeline(source, schema, canvas, glyph, agg, antialias=antialias)
(and similar here: https://github.com/holoviz/datashader/blob/21a8614122496d6dc8a57cd561a676a0f67c6480/datashader/transfer_functions/__init__.py#L460 )
fixable by
diff -ur datashader-0.14.3.orig/datashader/tests/test_dask.py datashader-0.14.3/datashader/tests/test_dask.py
--- datashader-0.14.3.orig/datashader/tests/test_dask.py 2023-01-13 19:26:45.718619814 +0100
+++ datashader-0.14.3/datashader/tests/test_dask.py 2023-01-13 19:35:03.835928881 +0100
@@ -956,8 +956,8 @@
# axis1 ragged arrays
(dict(data={
- 'x': pd.array([[-4, -2, 0], [2, 4]]),
- 'y': pd.array([[0, -4, 0], [4, 0]])
+ 'x': pd.array([[-4, -2, 0], [2, 4]], dtype=object),
+ 'y': pd.array([[0, -4, 0], [4, 0]], dtype=object)
}, dtype='Ragged[float32]'), dict(x='x', y='y', axis=1))
])
def test_area_to_zero_fixedrange(DataFrame, df_kwargs, cvs_kwargs):
But there is more and I don't think dask will fix it for you:
@bnavigator Yes, you are right. I will deal with this.
Prior to
numpy
1.24 creating an array from ragged nested sequences produced aVisibleDeprecationWarning
. With 1.24 this is now aValueError
. This is OK currently asnumba
doesn't yet supportnumpy
1.24 but it needs to be fixed here before that happens, so it is quite urgent.Thanks to @Hoxbro for identifying this (https://github.com/holoviz/geoviews/pull/608).