We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d5af29 commit 6c91ab0Copy full SHA for 6c91ab0
1 file changed
xarray_plotly/plotting.py
@@ -8,6 +8,7 @@
8
from typing import TYPE_CHECKING, Any
9
10
import numpy as np
11
+import numpy.typing as npt
12
import plotly.express as px
13
14
from xarray_plotly.common import (
@@ -171,7 +172,7 @@ def bar(
171
172
)
173
174
-def _classify_trace_sign(y_values: np.ndarray) -> str:
175
+def _classify_trace_sign(y_values: npt.ArrayLike) -> str:
176
"""Classify a trace as 'positive', 'negative', or 'mixed' based on its values."""
177
y_arr = np.asarray(y_values)
178
y_clean = y_arr[np.isfinite(y_arr) & (np.abs(y_arr) > 1e-9)]
0 commit comments