Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP: bump numpy to 2.2.0 #184

Merged
merged 3 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/cmasher/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from typing import TypeAlias

from matplotlib.artist import Artist
from numpy.typing import NDArray

_HAS_VISCM = find_spec("viscm") is not None

Expand Down Expand Up @@ -1362,7 +1363,8 @@ def register_cmap(name: str, data: RGB) -> None:
cm_data_arr = cm_data_arr / 255

# Convert cm_data to a list
colorlist = cm_data_arr.tolist()
# see https://github.com/numpy/numpy/issues/27944
colorlist = cm_data_arr.tolist() # type: ignore[assignment]

# Transform colorlist into a Colormap
cmap_N = len(colorlist)
Expand Down Expand Up @@ -1534,6 +1536,7 @@ def take_cmap_colors(
stop = int(np.ceil(cmap_range[1] * cmap.N)) - 1

# Pick colors
index: NDArray
if N is None:
index = np.arange(start, stop + 1, dtype=int)
else:
Expand Down
Loading
Loading