Skip to content

Commit 6c91ab0

Browse files
committed
fix typing
1 parent 6d5af29 commit 6c91ab0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

xarray_plotly/plotting.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import TYPE_CHECKING, Any
99

1010
import numpy as np
11+
import numpy.typing as npt
1112
import plotly.express as px
1213

1314
from xarray_plotly.common import (
@@ -171,7 +172,7 @@ def bar(
171172
)
172173

173174

174-
def _classify_trace_sign(y_values: np.ndarray) -> str:
175+
def _classify_trace_sign(y_values: npt.ArrayLike) -> str:
175176
"""Classify a trace as 'positive', 'negative', or 'mixed' based on its values."""
176177
y_arr = np.asarray(y_values)
177178
y_clean = y_arr[np.isfinite(y_arr) & (np.abs(y_arr) > 1e-9)]

0 commit comments

Comments
 (0)