diff --git a/holoviews/element/util.py b/holoviews/element/util.py index f6eee078d1..d84bb2cebc 100644 --- a/holoviews/element/util.py +++ b/holoviews/element/util.py @@ -24,6 +24,8 @@ if TYPE_CHECKING: from typing import TypeVar + import pandas as pd + Array = TypeVar("Array", np.ndarray, pd.api.extensions.ExtensionArray) @@ -349,6 +351,8 @@ def connect_edges(graph): def sort_arr(arr: Array) -> Array: + import pandas as pd + if isinstance(arr, pd.api.extensions.ExtensionArray): return arr[arr.argsort()] return np.sort(arr) diff --git a/holoviews/streams.py b/holoviews/streams.py old mode 100755 new mode 100644 index 7be4fc542c..94a213b650 --- a/holoviews/streams.py +++ b/holoviews/streams.py @@ -593,7 +593,6 @@ def __init__(self, data, length=1000, index=True, following=True, **params): def verify(self, x): - """ Verify consistency of dataframes that pass through this stream """ """Verify consistency of dataframes that pass through this stream """