Skip to content

Commit 2197132

Browse files
authored
fix: fix pre-commit (#110)
1 parent af9c925 commit 2197132

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/cmap/_color.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
RGBTuple, # 3-tuple of all ints or all floats
4747
RGBATuple, # 4-tuple of all floats, or 3 ints and 1 float
4848
np.ndarray, # 3- or 4-element rgb(a) vector
49+
np.number,
4950
list[Union[float, int]], # 3- or 4-element rgb(a) vector
5051
"Color", # another color object
5152
]

src/cmap/_colormap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ def to_css(
10771077
If `True`, return colors as hex strings, by default use `rgba()` strings.
10781078
"""
10791079
if max_stops and len(self._stops) > max_stops:
1080-
stops = tuple(np.linspace(0, 1, max_stops))
1080+
stops: tuple[np.floating, ...] = tuple(np.linspace(0, 1, max_stops))
10811081
colors = tuple(Color(c) for c in self.to_lut(max_stops))
10821082
else:
10831083
stops, colors = self.stops, self.colors

0 commit comments

Comments
 (0)