Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit15ab8b8

Browse files
authored
Merge pull request#26528 from meeseeksmachine/auto-backport-of-pr-26504-on-v3.8.x
Backport PR#26504 on branch v3.8.x (TYP: Add overload to specify output of Colormap.__call__ when possible)
2 parents7ecea2a +76cb6d0 commit15ab8b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎lib/matplotlib/colors.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,15 @@ class Colormap:
6969
N:int
7070
colorbar_extend:bool
7171
def__init__(self,name:str,N:int= ...)->None: ...
72+
@overload
73+
def__call__(
74+
self,X:Sequence[float]|np.ndarray,alpha:ArrayLike|None= ...,bytes:bool= ...
75+
)->np.ndarray: ...
76+
@overload
77+
def__call__(
78+
self,X:float,alpha:float|None= ...,bytes:bool= ...
79+
)->tuple[float,float,float,float]: ...
80+
@overload
7281
def__call__(
7382
self,X:ArrayLike,alpha:ArrayLike|None= ...,bytes:bool= ...
7483
)->tuple[float,float,float,float]|np.ndarray: ...

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp