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

Commitd11d47c

Browse files
committed
Corrected stubs for mutlivariate and bivariate colormaps
1 parent18f905d commitd11d47c

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

‎lib/matplotlib/__init__.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,6 @@ def _preprocess_data(
112112
)->Callable: ...
113113

114114
frommatplotlib.cmimport_colormapsascolormaps
115+
frommatplotlib.cmimport_multivar_colormapsasmultivar_colormaps
116+
frommatplotlib.cmimport_bivar_colormapsasbivar_colormaps
115117
frommatplotlib.colorsimport_color_sequencesascolor_sequences

‎lib/matplotlib/cm.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class ColormapRegistry(Mapping[str, colors.Colormap]):
1818
defget_cmap(self,cmap:str|colors.Colormap)->colors.Colormap: ...
1919

2020
_colormaps:ColormapRegistry= ...
21+
_multivar_colormaps:ColormapRegistry= ...
22+
_bivar_colormaps:ColormapRegistry= ...
2123

2224
defget_cmap(name:str|colors.Colormap|None= ...,lut:int|None= ...)->colors.Colormap: ...
2325

‎lib/matplotlib/colors.pyi

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,46 +141,45 @@ class ListedColormap(Colormap):
141141
classMultivarColormap:
142142
name:str
143143
colormaps:list[Colormap]
144-
combination_mode:str
145144
n_variates:int
146145
def__init__(self,name:str,colormaps:list[Colormap],combination_mode:str)->None: ...
147146
@overload
148147
def__call__(
149-
self,X:Sequence[Sequence[float]]|np.ndarray,alpha:ArrayLike|None= ...,bytes:bool= ...
148+
self,X:Sequence[Sequence[float]]|np.ndarray,alpha:ArrayLike|None= ...,bytes:bool= ...,clip:bool= ...
150149
)->np.ndarray: ...
151150
@overload
152151
def__call__(
153-
self,X:Sequence[float],alpha:float|None= ...,bytes:bool= ...
152+
self,X:Sequence[float],alpha:float|None= ...,bytes:bool= ...,clip:bool= ...
154153
)->tuple[float,float,float,float]: ...
155154
@overload
156155
def__call__(
157-
self,X:ArrayLike,alpha:ArrayLike|None= ...,bytes:bool= ...
156+
self,X:ArrayLike,alpha:ArrayLike|None= ...,bytes:bool= ...,clip:bool= ...
158157
)->tuple[float,float,float,float]|np.ndarray: ...
159158
defcopy(self)->MultivarColormap: ...
160159
def__copy__(self)->MultivarColormap: ...
161160
def__getitem__(self,item:int)->Colormap: ...
162161
def__iter__(self)->Colormap: ...
163162
def__len__(self)->int: ...
164163
defget_bad(self)->np.ndarray: ...
165-
defresampled(self,lutsize:Sequence[int|None])->MultivarColormap: ...
164+
defresampled(self,lutshape:Sequence[int|None])->MultivarColormap: ...
166165
defwith_extremes(
167166
self,
168167
*,
169168
bad:ColorType|None= ...,
170169
under:Sequence[ColorType]|None= ...,
171170
over:Sequence[ColorType]|None= ...
172171
)->MultivarColormap: ...
172+
@property
173+
defcombination_mode(self)->str: ...
173174
def_repr_html_(self)->str: ...
174175
def_repr_png_(self)->bytes: ...
175176

176177
classBivarColormap:
177178
name:str
178179
N:int
179180
M:int
180-
shape:str
181181
n_variates:int
182-
origin:tuple[float,float]
183-
def__init__(self,name:str,N:int= ...,M:int|None= ...,shape:str= ...,origin:tuple[float,float]= ...
182+
def__init__(self,name:str,N:int= ...,M:int|None= ...,shape:str= ...,origin:Sequence[float]= ...
184183
)->None: ...
185184
@overload
186185
def__call__(
@@ -196,13 +195,17 @@ class BivarColormap:
196195
)->tuple[float,float,float,float]|np.ndarray: ...
197196
@property
198197
deflut(self)->np.ndarray: ...
198+
@property
199+
defshape(self)->str: ...
200+
@property
201+
deforigin(self)->tuple[float,float]: ...
199202
def__copy__(self)->BivarColormap: ...
200203
def__getitem__(self,item:int)->Colormap: ...
201204
def__eq__(self,other)->bool: ...
202205
defget_bad(self)->np.ndarray: ...
203206
defget_outside(self)->np.ndarray: ...
204207
defcopy(self)->BivarColormap: ...
205-
defresampled(self,lutsize:Sequence[int|None])->BivarColormap: ...
208+
defresampled(self,lutshape:Sequence[int|None],transposed:bool= ...)->BivarColormap: ...
206209
deftransposed(self)->BivarColormap: ...
207210
defreversed(self,axis_0:bool=True,axis_1:bool=True)->BivarColormap: ...
208211
defwith_extremes(
@@ -211,17 +214,18 @@ class BivarColormap:
211214
bad:ColorType|None= ...,
212215
outside:ColorType|None= ...,
213216
shape:str|None= ...,
217+
origin:None|Sequence[float]= ...,
214218
)->MultivarColormap: ...
215219
def_repr_html_(self)->str: ...
216220
def_repr_png_(self)->bytes: ...
217221

218222
classSegmentedBivarColormap(BivarColormap):
219223
def__init__(
220-
self,patch:np.ndarray,name:str,N:int= ...,shape:str= ...,origin:tuple[float,float]= ...
224+
self,patch:np.ndarray,name:str,N:int= ...,shape:str= ...,origin:Sequence[float]= ...
221225
)->None: ...
222226

223227
classBivarColormapFromImage(BivarColormap):
224-
def__init__(self,lut:np.ndarray,name:str= ...,shape:str= ...,origin:tuple[float,float]= ...
228+
def__init__(self,lut:np.ndarray,name:str= ...,shape:str= ...,origin:Sequence[float]= ...
225229
)->None: ...
226230

227231
classNormalize:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp