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

Commit55b85e3

Browse files
trygvradQuLogic
andauthored
Apply suggestions from code review
Thank you@QuLogicCo-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent6985111 commit55b85e3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎lib/matplotlib/colors.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3242,13 +3242,13 @@ def __init__(self, norms, vmin=None, vmax=None, clip=False):
32423242
The constituent norms. The list must have a minimum length of 2.
32433243
vmin, vmax : float, None, or list of float or None
32443244
Limits of the constituent norms.
3245-
If a list, eacheachvalue is assigned toone of the constituent
3245+
If a list, each value is assigned toeach of the constituent
32463246
norms. Single values are repeated to form a list of appropriate size.
32473247
32483248
clip : bool or list of bools, default: False
32493249
Determines the behavior for mapping values outside the range
32503250
``[vmin, vmax]`` for the constituent norms.
3251-
If a list, eacheachvalue is assigned toone of the constituent
3251+
If a list, each value is assigned toeach of the constituent
32523252
norms. Single values are repeated to form a list of appropriate size.
32533253
32543254
"""
@@ -3348,7 +3348,8 @@ def _changed(self):
33483348
def__call__(self,value,clip=None):
33493349
"""
33503350
Normalize the data and return the normalized data.
3351-
Each variate in the input is assigned to the a constituent norm.
3351+
3352+
Each variate in the input is assigned to the constituent norm.
33523353
33533354
Parameters
33543355
----------
@@ -3381,8 +3382,7 @@ def __call__(self, value, clip=None):
33813382

33823383
definverse(self,value):
33833384
"""
3384-
Maps the normalized value (i.e., index in the colormap) back to image
3385-
data value.
3385+
Map the normalized value (i.e., index in the colormap) back to image data value.
33863386
33873387
Parameters
33883388
----------
@@ -3449,7 +3449,7 @@ def _iterable_variates_in_data(data, n_input):
34493449
"""
34503450
ifisinstance(data,np.ndarray)anddata.dtype.fieldsisnotNone:
34513451
data= [data[descriptor[0]]fordescriptorindata.dtype.descr]
3452-
ifnotlen(data)==n_input:
3452+
iflen(data)!=n_input:
34533453
raiseValueError("The input to this `MultiNorm` must be of shape "
34543454
f"({n_input}, ...), or have a data type with{n_input} "
34553455
"fields.")

‎lib/matplotlib/colors.pyi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,17 +403,17 @@ class MultiNorm(Normalize):
403403
clip:ArrayLike|bool= ...
404404
)->None: ...
405405
@property
406-
defnorms(self)->tuple: ...
406+
defnorms(self)->tuple[Normalize, ...]: ...
407407
@property# type: ignore[override]
408-
defvmin(self)->tuple[float|None]: ...
408+
defvmin(self)->tuple[float|None, ...]: ...
409409
@vmin.setter
410410
defvmin(self,value:ArrayLike|float|None)->None: ...
411411
@property# type: ignore[override]
412-
defvmax(self)->tuple[float|None]: ...
412+
defvmax(self)->tuple[float|None, ...]: ...
413413
@vmax.setter
414414
defvmax(self,value:ArrayLike|float|None)->None: ...
415415
@property# type: ignore[override]
416-
defclip(self)->tuple[bool]: ...
416+
defclip(self)->tuple[bool, ...]: ...
417417
@clip.setter
418418
defclip(self,value:ArrayLike|bool)->None: ...
419419
def__call__(self,value:ArrayLike,clip:ArrayLike|bool|None= ...)->list: ...# type: ignore[override]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp